class_docstr: Class representing a single plot curve. Instances of this class are created
  automatically as part of :class:`PlotDataItem <pyqtgraph.PlotDataItem>`; 
  these rarely need to be instantiated directly.
  
  Features:
  
    - Fast data update
    - Fill under curve
    - Mouse interaction
  
  =====================  ===============================================
  **Signals:**
  sigPlotChanged(self)   Emitted when the data being plotted has changed
  sigClicked(self, ev)   Emitted when the curve is clicked
  =====================  ===============================================
class_docstr_tok: ["Class","representing","a","single","plot","curve",".","Instances","of","this","class","are","created","automatically","as","part","of",":","class",":","`","PlotDataItem","<","pyqtgraph.PlotDataItem",">","`",";","these","rarely","need","to","be","instantiated","directly",".","Features",":","-","Fast","data","update","-","Fill","under","curve","-","Mouse","interaction","=====================","===============================================","*","*","Signals",":","*","*","sigPlotChanged","(","self",")","Emitted","when","the","data","being","plotted","has","changed","sigClicked","(","self",",","ev",")","Emitted","when","the","curve","is","clicked","=====================","==============================================="]
code: def updateData(self, *args, **kargs):
      profiler = debug.Profiler()
  
      if "compositionMode" in kargs:
          self.setCompositionMode(kargs["compositionMode"])
  
      if len(args) == 1:
          kargs["y"] = args[0]
      elif len(args) == 2:
          kargs["x"] = args[0]
          kargs["y"] = args[1]
  
      if "y" not in kargs or kargs["y"] is None:
          kargs["y"] = np.array([])
      if "x" not in kargs or kargs["x"] is None:
          kargs["x"] = np.arange(len(kargs["y"]))
  
      for k in ["x", "y"]:
          data = kargs[k]
          if isinstance(data, list):
              data = np.array(data)
              kargs[k] = data
          if not isinstance(data, np.ndarray) or data.ndim > 1:
              raise Exception("Plot data must be 1D ndarray.")
          if data.dtype.kind == "c":
              raise Exception("Can not plot complex data types.")
  
      profiler("data checks")
  
      # self.setCacheMode(QtWidgets.QGraphicsItem.CacheMode.NoCache)  ## Disabling and re-enabling the cache works around a bug in Qt 4.6 causing the cached results to display incorrectly
      ##    Test this bug with test_PlotWidget and zoom in on the animated plot
      self.yData = kargs["y"].view(np.ndarray)
      self.xData = kargs["x"].view(np.ndarray)
  
      self.invalidateBounds()
      self.prepareGeometryChange()
      self.informViewBoundsChanged()
  
      profiler("copy")
  
      if "stepMode" in kargs:
          self.opts["stepMode"] = kargs["stepMode"]
  
      if self.opts["stepMode"] in (
          "center",
          True,
      ):  ## check against True for backwards compatibility
          if self.opts["stepMode"] is True:
              warnings.warn(
                  'stepMode=True is deprecated and will result in an error after October 2022. Use stepMode="center" instead.',
                  DeprecationWarning,
                  stacklevel=3,
              )
          if (
              len(self.xData) != len(self.yData) + 1
          ):  ## allow difference of 1 for step mode plots
              raise Exception(
                  "len(X) must be len(Y)+1 since stepMode=True (got %s and %s)"
                  % (self.xData.shape, self.yData.shape)
              )
      else:
          if (
              self.xData.shape != self.yData.shape
          ):  ## allow difference of 1 for step mode plots
              raise Exception(
                  "X and Y arrays must be the same shape--got %s and %s."
                  % (self.xData.shape, self.yData.shape)
              )
  
      self.path = None
      self.fillPath = None
      self._fillPathList = None
      self._mouseShape = None
      self._lineSegmentsRendered = False
  
      if "name" in kargs:
          self.opts["name"] = kargs["name"]
      if "connect" in kargs:
          self.opts["connect"] = kargs["connect"]
      if "pen" in kargs:
          self.setPen(kargs["pen"])
      if "shadowPen" in kargs:
          self.setShadowPen(kargs["shadowPen"])
      if "fillLevel" in kargs:
          self.setFillLevel(kargs["fillLevel"])
      if "fillOutline" in kargs:
          self.opts["fillOutline"] = kargs["fillOutline"]
      if "brush" in kargs:
          self.setBrush(kargs["brush"])
      if "antialias" in kargs:
          self.opts["antialias"] = kargs["antialias"]
      if "skipFiniteCheck" in kargs:
          self.opts["skipFiniteCheck"] = kargs["skipFiniteCheck"]
  
      profiler("set")
      self.update()
      profiler("update")
      self.sigPlotChanged.emit(self)
      profiler("emit")
  
imports: from ..Qt import QtCore, QtGui, QtWidgets
  import math
  import sys
  import warnings
  import numpy
  from ..None import Qt, debug
  from ..None import functions
  from ..None import getConfigOption
  from .GraphicsObject import GraphicsObject
label_desc: Use image node_id 18 for calling the PlotCurveItem obj's underlying member method code with example usage: obj.updateData() without return types