code: def __init__(self, data, bins=10, color="w", orientation="h"):
      #   4-5
      #   | |
      # 1-2/7-8
      # |/| | |
      # 0-3-6-9
      data = np.asarray(data)
      if data.ndim != 1:
          raise ValueError("Only 1D data currently supported")
      if not isinstance(orientation, str) or orientation not in (
          "h",
          "v",
      ):
          raise ValueError(
              'orientation must be "h" or "v", not %s' % (orientation,)
          )
      X, Y = (0, 1) if orientation == "h" else (1, 0)
  
      # do the histogramming
      data, bin_edges = np.histogram(data, bins)
      # construct our vertices
      rr = np.zeros((3 * len(bin_edges) - 2, 3), np.float32)
      rr[:, X] = np.repeat(bin_edges, 3)[1:-1]
      rr[1::3, Y] = data
      rr[2::3, Y] = data
      bin_edges.astype(np.float32)
      # and now our tris
      tris = np.zeros((2 * len(bin_edges) - 2, 3), np.uint32)
      offsets = (
          3
          * np.arange(len(bin_edges) - 1, dtype=np.uint32)[
              :, np.newaxis
          ]
      )
      tri_1 = np.array([0, 2, 1])
      tri_2 = np.array([2, 0, 3])
      tris[::2] = tri_1 + offsets
      tris[1::2] = tri_2 + offsets
      MeshVisual.__init__(self, rr, tris, color=color)
  
imports: import numpy
  from .mesh import MeshVisual
label_desc: Use image node_id 1 to create a new HistogramVisual object from inherited base classes: MeshVisual with example: obj = HistogramVisual(data, bins, color, orientation)