簡體   English   中英

如何在 finplot 中使用多個軸作為布局中的小部件

[英]How to use multiple axes with finplot as a widget in layout

在布局中使用 finplot 作為小部件- 它工作得很好:

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

我想做的是使用上面的小部件,但也有多個軸,即:

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

這將如何工作?

最后,我只使用了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)

        ...

我還發現具有多個軸的單個pg.GraphicsLayoutWidget比每個pyqtgraph.dockarea的軸快得多。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM