code: def main():
      fig, ax = plt.subplots()
  
      years = np.arange(2004, 2009)
      heights = [7900, 8100, 7900, 6900, 2800]
      box_colors = [
          (0.8, 0.2, 0.2),
          (0.2, 0.8, 0.2),
          (0.2, 0.2, 0.8),
          (0.7, 0.5, 0.8),
          (0.3, 0.8, 0.7),
      ]
  
      for year, h, bc in zip(years, heights, box_colors):
          bbox0 = Bbox.from_extents(year - 0.4, 0.0, year + 0.4, h)
          bbox = TransformedBbox(bbox0, ax.transData)
          ax.add_artist(
              RibbonBoxImage(ax, bbox, bc, interpolation="bicubic")
          )
          ax.annotate(str(h), (year, h), va="bottom", ha="center")
  
      ax.set_xlim(years[0] - 0.5, years[-1] + 0.5)
      ax.set_ylim(0, 10000)
  
      background_gradient = np.zeros((2, 2, 4))
      background_gradient[:, :, :3] = [1, 1, 0]
      background_gradient[:, :, 3] = [
          [0.1, 0.3],
          [0.3, 0.5],
      ]  # alpha channel
      ax.imshow(
          background_gradient,
          interpolation="bicubic",
          zorder=0.1,
          extent=(0, 1, 0, 1),
          transform=ax.transAxes,
      )
  
      plt.show()
  
file_path: matplotlib/galleries/examples/misc/demo_ribbon_box.py
imports: import matplotlib.pyplot
  import numpy
  from matplotlib import cbook
  from matplotlib import colors
  from matplotlib.image import AxesImage
  from matplotlib.transforms import Bbox, BboxTransformTo, TransformedBbox
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types