Skip to content

Commit

Permalink
autoware is now supported.
Browse files Browse the repository at this point in the history
Signed-off-by: emb4 <[email protected]>
  • Loading branch information
emori-ctc committed Sep 14, 2023
1 parent 7b09242 commit 94b87f7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/caret_analyze/plot/visualize_lib/bokeh/bokeh.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,14 @@ def histogram(
color_selector = ColorSelectorFactory.create_instance('unique')
if data_type in ['period', 'latency']:
data_list = [[_ *10**(-6) for _ in data] for data in data_list]
max_value = max(max(data_list, key=lambda x: max(x)))
min_value = min(min(data_list, key=lambda x: min(x)))
# max_value = max(max(data_list, key=lambda x: max(x)))
max_value = max(
max([max_len for max_len in data_list if len(max_len)], key=lambda x: max(x))
)
# min_value = min(min(data_list, key=lambda x: min(x)))
min_value = min(
min([min_len for min_len in data_list if len(min_len)], key=lambda x: min(x))
)
for hist_type, target_object in zip(data_list, target_objects):
hist, bins = histogram(hist_type, 20, (min_value, max_value), density=True)
quad = plot.quad(top=hist, bottom=0,
Expand All @@ -206,7 +212,7 @@ def histogram(
)
plot.add_tools(hover)

legends = legend_manager.create_legends(20, True, location='top_right')
legends = legend_manager.create_legends(20, False, location='top_right')
for legend in legends:
plot.add_layout(legend, 'right')
return plot

0 comments on commit 94b87f7

Please sign in to comment.