Skip to content

Commit

Permalink
Fix broken remove/clear_figure link. (#1858)
Browse files Browse the repository at this point in the history
* Fix broken remove/clear_figure link.

Fix #1857

* fix clear figure in linear view
  • Loading branch information
joernu76 authored Aug 10, 2023
1 parent 82723a7 commit c22c083
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mslib/msui/mpl_qtwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,9 +651,10 @@ def setup_linear_view(self):

def clear_figure(self):
logging.debug("path of linear view has changed.. removing invalidated plots")
self.ax.figure.clf()
self.fig.clf()
self.ax = self.fig.add_subplot(111, zorder=99)
self.ax.figure.patch.set_visible(False)
self.fig.canvas.draw()

def redraw_xaxis(self, lats, lons):
# Re-label x-axis.
Expand Down
2 changes: 1 addition & 1 deletion mslib/msui/wms_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ def stop_capabilities_retrieval(self):

def clear_map(self):
logging.debug("clear figure")
self.view.clear_figure()
self.view.plotter.clear_figure()
logging.debug("enabling checkboxes in map-options if any")
self.signal_enable_cbs.emit()

Expand Down

0 comments on commit c22c083

Please sign in to comment.