BC: Edit: Fix update plot.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-05-04 10:22:39 +02:00
1 parent 63d7541062
commit f8355021e7
2 files changed
+23 -4

No files matched your search

+8 -4
View File
@@ -35,7 +35,7 @@ class Plot(APlot):
x, y,
color='r', lw=1.,
markersize=5, marker='+',
picker=30
picker=30,
)
# Plot label
@@ -47,9 +47,10 @@ class Plot(APlot):
table_headers[header[1]], color='black', fontsize=10
)
self.canvas.axes.autoscale_view(True, True, True)
self.canvas.figure.tight_layout()
self.canvas.figure.canvas.draw_idle()
self.toolbar.update()
#self.toolbar.update()
self._init = True
@@ -59,9 +60,12 @@ class Plot(APlot):
self.draw()
return
# if ind is not None:
x = list(map(lambda v: v[0], self.data.data))
y = list(map(lambda v: v[1], self.data.data))
# else:
self._line.set_data(x, y)
self.canvas.axes.relim()
self.canvas.axes.autoscale()
self.canvas.figure.tight_layout()
self.canvas.figure.canvas.draw_idle()