diff --git a/lib/matplotlib/backends/backend_wx.py b/lib/matplotlib/backends/backend_wx.py index 2296f2877a7c..37d349ad98d7 100644 --- a/lib/matplotlib/backends/backend_wx.py +++ b/lib/matplotlib/backends/backend_wx.py @@ -1109,7 +1109,7 @@ def _set_frame_icon(frame): class NavigationToolbar2Wx(NavigationToolbar2, wx.ToolBar): - def __init__(self, canvas): + def __init__(self, canvas, coordinates=True): wx.ToolBar.__init__(self, canvas.GetParent(), -1) if 'wxMac' in wx.PlatformInfo: @@ -1131,9 +1131,11 @@ def __init__(self, canvas): self.Bind(wx.EVT_TOOL, getattr(self, callback), id=self.wx_ids[text]) - self.AddStretchableSpace() - self._label_text = wx.StaticText(self) - self.AddControl(self._label_text) + self._coordinates = coordinates + if self._coordinates: + self.AddStretchableSpace() + self._label_text = wx.StaticText(self) + self.AddControl(self._label_text) self.Realize() @@ -1338,7 +1340,8 @@ def statbar(self): return self.GetTopLevelParent().GetStatusBar() def set_message(self, s): - self._label_text.SetLabel(s) + if self._coordinates: + self._label_text.SetLabel(s) def set_history_buttons(self): can_backward = self._nav_stack._pos > 0
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: