diff --git a/src/msspec/iodata.py b/src/msspec/iodata.py index 3308cb5..998485b 100644 --- a/src/msspec/iodata.py +++ b/src/msspec/iodata.py @@ -80,6 +80,7 @@ import numpy as np import wx.grid from lxml import etree from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas +#from matplotlib.backends.backend_wxagg import FigureCanvasWx as FigureCanvas from matplotlib.backends.backend_agg import FigureCanvasAgg from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg from matplotlib.figure import Figure @@ -1084,7 +1085,8 @@ class _DataWindow(wx.Frame): for dset in self.data: nb = wx.Notebook(self, -1) self.notebooks[dset.title] = nb - self.GetSizer().Add(nb, 1, wx.ALL|wx.EXPAND) + #self.GetSizer().Add(nb, 1, wx.ALL|wx.EXPAND) + self.GetSizer().Add(nb, proportion=1, flag=wx.ALL|wx.EXPAND) for view in dset.views(): self.create_page(nb, view) @@ -1273,10 +1275,12 @@ class _DataWindow(wx.Frame): toolbar = NavigationToolbar2WxAgg(canvas) toolbar.Realize() - sizer.Add(toolbar, 0, wx.ALL|wx.EXPAND) + #sizer.Add(toolbar, 0, wx.ALL|wx.EXPAND) + sizer.Add(toolbar, proportion=0, flag=wx.ALL|wx.EXPAND) toolbar.update() - sizer.Add(canvas, 5, wx.ALL|wx.EXPAND) + #sizer.Add(canvas, 5, wx.ALL|wx.EXPAND) + sizer.Add(canvas, proportion=1, flag=wx.ALL|wx.EXPAND) p.SetSizer(sizer) p.Fit() @@ -1287,6 +1291,7 @@ class _DataWindow(wx.Frame): figure.canvas.mpl_connect('pick_event', self.on_mpl_pick) nb.AddPage(p, view.title) + canvas.draw() def OLDcreate_page(self, nb, view):