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 _generateStepModeData(stepMode, x, y, baseline):
      ## each value in the x/y arrays generates 2 points.
      if stepMode == "right":
          x2 = np.empty((len(x) + 1, 2), dtype=x.dtype)
          x2[:-1] = x[:, np.newaxis]
          x2[-1] = x2[-2]
      elif stepMode == "left":
          x2 = np.empty((len(x) + 1, 2), dtype=x.dtype)
          x2[1:] = x[:, np.newaxis]
          x2[0] = x2[1]
      elif stepMode in (
          "center",
          True,
      ):  ## support True for back-compat
          x2 = np.empty((len(x), 2), dtype=x.dtype)
          x2[:] = x[:, np.newaxis]
      else:
          raise ValueError("Unsupported stepMode %s" % stepMode)
      if baseline is None:
          x = x2.reshape(x2.size)[1:-1]
          y2 = np.empty((len(y), 2), dtype=y.dtype)
          y2[:] = y[:, np.newaxis]
          y = y2.reshape(y2.size)
      else:
          # if baseline is provided, add vertical lines to left/right ends
          x = x2.reshape(x2.size)
          y2 = np.empty((len(y) + 2, 2), dtype=y.dtype)
          y2[1:-1] = y[:, np.newaxis]
          y = y2.reshape(y2.size)[1:-1]
          y[[0, -1]] = baseline
      return x, y
  
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 19 for calling the PlotCurveItem obj's underlying member method code with example usage: obj._generateStepModeData(stepMode, x, y, baseline) and returns: x,  y