2

I have used finplot as a widget in layout - it works very well:

self.tab1.fplt_widget = pg.PlotWidget(
    plotItem=fplt.create_plot_widget(self.window())
)

What I'd like to do is use the above widget, but also have multiple axes, ie:

ax, ax1 = fplt.create_plot_widget(self.window())

How would this work?

jonsl
  • 31
  • 4

1 Answers1

1

In the end I just used a wrapper of the pg.GraphicsLayoutWidget:

class ChartGraphWidget(pg.GraphicsLayoutWidget):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)

        self.centralWidget.installEventFilter(self)
        self.ci.setContentsMargins(0, 0, 0, 0)
        self.ci.setSpacing(-1)

        self.show_maximized = True  # maximize
        sx0 = axs = fplt.create_plot_widget(
            master=self, rows=4, init_zoom_periods=50)

        ...

I also discovered that a single pg.GraphicsLayoutWidget with multiple axes is much faster than an axis for each pyqtgraph.dockarea.

jonsl
  • 31
  • 4