Set Null points

40 views
Skip to first unread message

Peter 'mash' Morgan

unread,
Mar 5, 2014, 5:56:28 PM3/5/14
to pyqt...@googlegroups.com
Is it possible to set "null" points, ie a symbol would not appear eg


chartWidget = pg.PlotWidget()
chartWidget.plot([None, None, 1 2], name="2012", symbol='o')
chartWidget.plot([4, 5, 6, 7], name="2013", symbol='o')
chartWidget.plot([8,9, None, None], name="2014", symbol='o')

In this case the first and last plots, the line is trauncated with no data to preset

tia
regards
pete

Luke Campagnola

unread,
Mar 5, 2014, 8:21:33 PM3/5/14
to pyqt...@googlegroups.com
Use np.nan; Qt will automatically omit these when drawing.
 

Peter Morgan

unread,
Mar 5, 2014, 9:03:52 PM3/5/14
to pyqt...@googlegroups.com
lovely lovely.

Maybe things like this should go into an FAQ in the docs ?




itay peled

unread,
Oct 26, 2019, 1:57:50 PM10/26/19
to pyqtgraph
I tried it but it still connects the two points before the nan and after the nan. Is there a way to make the plot disconnected?
Reply all
Reply to author
Forward
0 new messages