class_docstr: **Bases:** :class:`GraphicsObject <pyqtgraph.GraphicsObject>`
  
  :class:`PlotDataItem` provides a unified interface for displaying plot curves, scatter plots, or both.
  It also contains methods to transform or decimate the original data before it is displayed. 
  
  As pyqtgraph's standard plotting object, ``plot()`` methods such as :func:`pyqtgraph.plot` and
  :func:`PlotItem.plot() <pyqtgraph.PlotItem.plot>` create instances of :class:`PlotDataItem`.
  
  While it is possible to use :class:`PlotCurveItem <pyqtgraph.PlotCurveItem>` or
  :class:`ScatterPlotItem <pyqtgraph.ScatterPlotItem>` individually, this is recommended only
  where performance is critical and the limited functionality of these classes is sufficient.
  
  ==================================  ==============================================
  **Signals:**
  sigPlotChanged(self)                Emitted when the data in this item is updated.
  sigClicked(self, ev)                Emitted when the item is clicked.
  sigPointsClicked(self, points, ev)  Emitted when a plot point is clicked
                                      Sends the list of points under the mouse.
  sigPointsHovered(self, points, ev)  Emitted when a plot point is hovered over.
                                      Sends the list of points under the mouse.
  ==================================  ==============================================
class_docstr_tok: ["*","*","Bases",":","*","*",":","class",":","`","GraphicsObject","<","pyqtgraph.GraphicsObject",">","`",":","class",":","`","PlotDataItem","`","provides","a","unified","interface","for","displaying","plot","curves",",","scatter","plots",",","or","both",".","It","also","contains","methods","to","transform","or","decimate","the","original","data","before","it","is","displayed",".","As","pyqtgraph","'s","standard","plotting","object",",","``","plot","(",")","``","methods","such","as",":","func",":","`","pyqtgraph.plot","`","and",":","func",":","`","PlotItem.plot","(",")","<","pyqtgraph.PlotItem.plot",">","`","create","instances","of",":","class",":","`","PlotDataItem","`",".","While","it","is","possible","to","use",":","class",":","`","PlotCurveItem","<","pyqtgraph.PlotCurveItem",">","`","or",":","class",":","`","ScatterPlotItem","<","pyqtgraph.ScatterPlotItem",">","`","individually",",","this","is","recommended","only","where","performance","is","critical","and","the","limited","functionality","of","these","classes","is","sufficient",".","==================================","==============================================","*","*","Signals",":","*","*","sigPlotChanged","(","self",")","Emitted","when","the","data","in","this","item","is","updated",".","sigClicked","(","self",",","ev",")","Emitted","when","the","item","is","clicked",".","sigPointsClicked","(","self",",","points",",","ev",")","Emitted","when","a","plot","point","is","clicked","Sends","the","list","of","points","under","the","mouse",".","sigPointsHovered","(","self",",","points",",","ev",")","Emitted","when","a","plot","point","is","hovered","over",".","Sends","the","list","of","points","under","the","mouse",".","==================================","=============================================="]
docstr: Sets the downsampling mode of this item. Downsampling reduces the number
  of samples drawn to increase performance.
  
  ==============  =================================================================
  **Arguments:**
  ds              (int) Reduce visible plot samples by this factor. To disable,
                  set ds=1.
  auto            (bool) If True, automatically pick *ds* based on visible range
  mode            'subsample': Downsample by taking the first of N samples.
                  This method is fastest and least accurate.
                  'mean': Downsample by taking the mean of N samples.
                  'peak': Downsample by drawing a saw wave that follows the min
                  and max of the original data. This method produces the best
                  visual representation of the data but is slower.
  ==============  =================================================================
docstr_tok: ["Sets","the","downsampling","mode","of","this","item",".","Downsampling","reduces","the","number","of","samples","drawn","to","increase","performance",".","==============","=================================================================","*","*","Arguments",":","*","*","ds","(","int",")","Reduce","visible","plot","samples","by","this","factor",".","To","disable",",","set","ds=1",".","auto","(","bool",")","If","True",",","automatically","pick","*","ds","*","based","on","visible","range","mode","'subsample","'",":","Downsample","by","taking","the","first","of","N","samples",".","This","method","is","fastest","and","least","accurate",".","'mean","'",":","Downsample","by","taking","the","mean","of","N","samples",".","'peak","'",":","Downsample","by","drawing","a","saw","wave","that","follows","the","min","and","max","of","the","original","data",".","This","method","produces","the","best","visual","representation","of","the","data","but","is","slower",".","==============","================================================================="]
code: def setDownsampling(self, ds=None, auto=None, method=None):
      """
      Sets the downsampling mode of this item. Downsampling reduces the number
      of samples drawn to increase performance.
  
      ==============  =================================================================
      **Arguments:**
      ds              (int) Reduce visible plot samples by this factor. To disable,
                      set ds=1.
      auto            (bool) If True, automatically pick *ds* based on visible range
      mode            'subsample': Downsample by taking the first of N samples.
                      This method is fastest and least accurate.
                      'mean': Downsample by taking the mean of N samples.
                      'peak': Downsample by drawing a saw wave that follows the min
                      and max of the original data. This method produces the best
                      visual representation of the data but is slower.
      ==============  =================================================================
      """
      changed = False
      if ds is not None:
          if self.opts["downsample"] != ds:
              changed = True
              self.opts["downsample"] = ds
  
      if auto is not None and self.opts["autoDownsample"] != auto:
          self.opts["autoDownsample"] = auto
          changed = True
  
      if method is not None:
          if self.opts["downsampleMethod"] != method:
              changed = True
              self.opts["downsampleMethod"] = method
  
      if changed:
          self._datasetMapped = None  # invalidata mapped data
          self._datasetDisplay = None  # invalidate display data
          self._adsLastValue = 1  # reset auto-downsample value
          self.updateItems(styleUpdate=False)
  
imports: import math
  import warnings
  import bisect
  import numpy
  from ..None import debug
  from ..None import functions
  from ..None import getConfigOption
  from ..Qt import QtCore
  from .GraphicsObject import GraphicsObject
  from .PlotCurveItem import PlotCurveItem
  from .ScatterPlotItem import ScatterPlotItem
label_desc: Use image node_id 24 for calling the PlotDataItem obj's underlying member method code with example usage: obj.setDownsampling(ds, auto, method) without return types