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]> 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].
> 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/CAD_qyJqe7ET%2BnXcLiXBEGFqcBcW8E_EZ69nRyUE8ZSdnyApZPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to