Skip to content

Commit

Permalink
Fixed bug displaying data offline
Browse files Browse the repository at this point in the history
  • Loading branch information
nicktrem committed Sep 3, 2024
1 parent 76b3129 commit 767c83c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions robot_log_visualizer/plotter/matplotlib_viewer_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,8 @@ def on_pick(self, event):
)

def update_plots(self, paths, legends, realtime_plot):
if realtime_plot:
self.axes.cla()
realtimeColorIndex = 0
self.axes.cla()
colorIndex = 0
for path, legend in zip(paths, legends):
path_string = "/".join(path)
legend_string = "/".join(legend[1:])
Expand All @@ -210,17 +209,18 @@ def update_plots(self, paths, legends, realtime_plot):
datapoints,
label=legend_string,
picker=True,
color=self.color_palette.get_color(realtimeColorIndex),
color=self.color_palette.get_color(colorIndex),
)
realtimeColorIndex = realtimeColorIndex + 1
colorIndex = colorIndex + 1
else:
(self.active_paths[path_string],) = self.axes.plot(
timestamps,
datapoints,
label=legend_string,
picker=True,
color=next(self.color_palette),
color=self.color_palette.get_color(colorIndex),
)
colorIndex = colorIndex + 1


paths_to_be_canceled = []
Expand Down

0 comments on commit 767c83c

Please sign in to comment.