Skip to content

Commit 94b87f7

Browse files
committed
autoware is now supported.
Signed-off-by: emb4 <[email protected]>
1 parent 7b09242 commit 94b87f7

File tree

1 file changed

+9
-3
lines changed
  • src/caret_analyze/plot/visualize_lib/bokeh

1 file changed

+9
-3
lines changed

src/caret_analyze/plot/visualize_lib/bokeh/bokeh.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,14 @@ def histogram(
192192
color_selector = ColorSelectorFactory.create_instance('unique')
193193
if data_type in ['period', 'latency']:
194194
data_list = [[_ *10**(-6) for _ in data] for data in data_list]
195-
max_value = max(max(data_list, key=lambda x: max(x)))
196-
min_value = min(min(data_list, key=lambda x: min(x)))
195+
# max_value = max(max(data_list, key=lambda x: max(x)))
196+
max_value = max(
197+
max([max_len for max_len in data_list if len(max_len)], key=lambda x: max(x))
198+
)
199+
# min_value = min(min(data_list, key=lambda x: min(x)))
200+
min_value = min(
201+
min([min_len for min_len in data_list if len(min_len)], key=lambda x: min(x))
202+
)
197203
for hist_type, target_object in zip(data_list, target_objects):
198204
hist, bins = histogram(hist_type, 20, (min_value, max_value), density=True)
199205
quad = plot.quad(top=hist, bottom=0,
@@ -206,7 +212,7 @@ def histogram(
206212
)
207213
plot.add_tools(hover)
208214

209-
legends = legend_manager.create_legends(20, True, location='top_right')
215+
legends = legend_manager.create_legends(20, False, location='top_right')
210216
for legend in legends:
211217
plot.add_layout(legend, 'right')
212218
return plot

0 commit comments

Comments
 (0)