/wx_ex

Implement MultiPlotPanel and StackedPlotPanel, derived from MultiPlotFrame and StackedPlotFrame

Primary LanguagePython

wx_extras

Sat 12 Feb 2022 12:11:19 PM PST

The wxmplot library contains two interesting classes to instantiate graphs into a multi-plot frame and stacked-plot frame.

The wx heirarchy does not allow frames to be nested, so this will take a subset of these that use the wx Panel and make that available allowing them to be added to other wx frames.

MultiPanel

Derived Panel version of wxmplot MultiFrame.

StackedPlotPanel

Derived Panel version of wxmplot StackedPlotPanel.

Heirarchy

Three levels with specific classes:

  • Top Window - wxmplot.BaseFrame derived class for overall layout.
  • Column 1 - bespoke wx.Panel derived classes for devices
  • Column 2 - bespoke wx.Panel derived classes for stacked plot
  • Bottom - plotting is done with wxmplot.PlotPanel derived classes.

MultiFrameEx

  • wx.Frame(... wx.Window)
  • wxmplot.BaseFrame(wx.Frame)
  • wxmplot.PlotFrame(wxmplot.BaseFrame)
  • wx_ex.MultiFrameEx(wxmplot.BaseFrame)
  • wx_ex.TwoColumnFrameEx(wx_ex.MultiFrameEx)

PlotPanelEx

  • wx.Panel(... wx.Window)
  • wxmplot.BasePanel(wx.Panel)
  • wxmplot.PlotPanel(wxmplot.BasePanel)
  • wx_ex.PlotPanelEx(wxmplot.PlotFrame)
  • wx_ex.MultiPlotPanelEx(wx_ex.PlotPanelEx)
  • wx_ex.GridBagSizerPanelEx(wx_ex.MultiPlotPanelEx)
  • wx_ex.WrapSizerPanelEx(wx_ex.MultiPlotPanelEx)

StackedPlotPanelEx

  • wx.Panel(... wx.Window)
  • wxmplot.BasePanel(wx.Panel)
  • wxmplot.PlotPanel(wxmplot.BasePanel)
  • wx_ex.PlotPanelEx(wxmplot.PlotFrame)
  • wx_ex.StackedPlotPanelEx(wx_ex.PlotPanelEx)

Column 1 - Devices

Each device type (HRM, PM, FEC) has its own class:

  • wx_ex.HRMPanel(wx.Panel)
  • wx_ex.PMPanel(wx.Panel)
  • wx_ex.FECPanel(wx.Panel)

These are created to contain various PlotPanelEx derived plotting panels.

They are added to the MultiFrameEx sizer.

Colum 2 - Stacked Plots

A single(?) StackedPlots panel is created to contain multiple StackedPlotEx panels.

  • wx_ex.StackedPlots(wx.Panel)