Hello, Thank you for this very interesting hint and example code. Sadly using plot() instead of PlotCurveItem comes with a decreased performance. I measure ~50ms (plot) vs ~40ms (PlotCurveItem) per frame for Multiple plot example which is the reason why I started using PlotCurveItem in the first place. Of course the downsampling helps to catch up/surpass this effect but only for higher down sample rates. Additionally the issue remains that using the GUI context menu to set downsampling does raise an exception for the unmodified multiple plots example.
best regards Am Dienstag, 30. Mai 2017 03:17:19 UTC+2 schrieb Vasilije Mehandzic: > > You need to set Downsampling of PlotItem, not of PlotCurveItem. > > # example > import pyqtgraph > graphics_layout_widget = pyqtgraph.GraphicsLayoutWidget() > plot_item = graphics_layout_widget.addPlot() > # this works well > plot_item.setDownsampling(auto=False, ds=2, mode='mean') > plot_curve_item = plot_item.plot() > # this produce an exception > # plot_curve_item.setDownsampling(auto=False, ds=2, mode='mean') > > > On Thu, May 25, 2017 at 8:17 PM, <[email protected] <javascript:>> > wrote: > >> Hello everyone, >> >> I am currently struggling to use pyqtgraph for realtime ploting of 64 >> curves à >1k samples with a samplingrate of >1kHz. I found the "Multiple >> plots" example which shows the use of PlotCurveItem to increase the >> performance which really improves the update time. But as I draw every >> curve in a seperate plotwidget refresh rate is not as high as in the >> example. So I wanted to try downsampling. But if I call setDownsampling for >> a plot the following exception is generated: >> Traceback (most recent call last): >> File >> "C:\Python27\lib\site-packages\pyqtgraph\graphicsItems\PlotItem\PlotItem.py" >> , line 952, in updateDownsampling >> c.setDownsampling(ds, auto, method) >> AttributeError: 'PlotCurveItem' object has no attribute 'setDownsampling' >> >> Interestingly the program continues to run. To reproduce this behaviour >> just add p.setDownsampling(ds=True) to the Multiple plots" example e.g. in >> line after >> >> p.setLabel('bottom', 'Index', units='B') . >> >> >> best regards, >> >> >> Nox >> >> -- >> You received this message because you are subscribed to the Google Groups >> "pyqtgraph" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pyqtgraph/7f4688ab-b194-4034-b626-adf4bad17d81%40googlegroups.com >> >> <https://groups.google.com/d/msgid/pyqtgraph/7f4688ab-b194-4034-b626-adf4bad17d81%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "pyqtgraph" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/1bfd2df2-27a9-4196-b9af-21b5214b1fe9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
