Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed legend, which also happens to fix the program not exiting prope…

…rly.
  • Loading branch information...
commit d129fe0af2429dd3280b387b0a17e9d0d8e5f927 1 parent 9810ca4
@ibrahima authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 matplotlib_plotter.py
View
6 matplotlib_plotter.py
@@ -227,7 +227,7 @@ def plot_value(self, key, value, r=255.0, g=255.0, b=0.0):
linewidth=1,
color=(r/255.0, g/255.0, b/255.0),
label=str(key))[0])
- legend()
+ self.axes.legend()
else:
self.data[key].append(value)
@@ -289,8 +289,8 @@ def draw_plot(self):
if not self.paused: # Don't update graph if paused.
for key in self.data.keys():
self.plots[key].set_xdata(np.arange(len(self.data[key])))
- self.plots[key].set_ydata(np.array(self.data[key]))
- legend()
+ self.plots[key].set_ydata(np.array(self.data[key]))
+
self.canvas.draw()
def on_pause_button(self, event):
Please sign in to comment.
Something went wrong with that request. Please try again.