【发布时间】:2019-06-11 19:50:19
【问题描述】:
我正在创建 pyqtgraph.plot() 项目的字典,然后将这些项目添加到选项卡式 PyQt 窗口。但是,一旦创建了这些对象,也会生成一个窗口。我可以调用 win.hide() 函数来摆脱这些窗口,但它们最初仍然会弹出。有什么办法可以防止在创建绘图对象时弹出窗口?
import pyqtgraph as pg
#Generate dictionary containing pyqtgraph plots
plot_dict = {'plot_1': pg.plot(),
'plot_2': pg.plot(),
'plot_3': [pg.plot()'
}
#Hide plot windows after they are generated
for plot in plot_dict:
plot.win.hide()
基本上:我可以在 pg.plot() 中包含一个标志来阻止窗口显示吗?
【问题讨论】:
-
'plot_3': [pg.plot()'应该是'plot_3': pg.plot()
标签: python plot pyqt pyqtgraph