- in legacy graphic engine, fixed bug that made the old object disappear when a new object was loaded

- in legacy graphic engine, fixed bug that crashed the app when creating a new project
This commit is contained in:
Marius Stanciu
2019-09-23 01:25:06 +03:00
committed by Marius
parent e349953637
commit c17d05600b
3 changed files with 18 additions and 1 deletions

View File

@@ -306,10 +306,21 @@ class PlotCanvasLegacy(QtCore.QObject):
self.figure.add_axes(self.axes)
self.axes.set_aspect(1)
self.axes.grid(True)
self.axes.axhline(color=(0.70, 0.3, 0.3), linewidth=2)
self.axes.axvline(color=(0.70, 0.3, 0.3), linewidth=2)
self.adjust_axes(-10, -10, 100, 100)
# Re-draw
self.canvas.draw_idle()
def redraw(self):
"""
Created only to serve for compatibility with the VisPy plotcanvas (the other graphic engine, 3D)
:return:
"""
self.clear()
def adjust_axes(self, xmin, ymin, xmax, ymax):
"""
Adjusts all axes while maintaining the use of the whole canvas