Have test_PlotCurveItem use GraphicsLayoutWidget and not the deprecated GraphicsWindow

This commit is contained in:
Ogi Moore 2021-02-11 22:20:23 -08:00
parent d14a90112c
commit 36d89fa3a5

View File

@ -4,10 +4,11 @@ from pyqtgraph.tests import assertImageApproved
def test_PlotCurveItem():
p = pg.GraphicsWindow()
p.ci.layout.setContentsMargins(4, 4, 4, 4) # default margins vary by platform
v = p.addViewBox()
p = pg.GraphicsLayoutWidget()
p.resize(200, 150)
p.ci.setContentsMargins(4, 4, 4, 4) # default margins vary by platform
p.show()
v = p.addViewBox()
data = np.array([1,4,2,3,np.inf,5,7,6,-np.inf,8,10,9,np.nan,-1,-2,0])
c = pg.PlotCurveItem(data)
v.addItem(c)