code: def plot_colored_circles(ax, prng, nb_samples=15):
      """
      Plot circle patches.
  
      NB: draws a fixed amount of samples, rather than using the length of
      the color cycle, because different styles may have different numbers
      of colors.
      """
      for sty_dict, j in zip(
          plt.rcParams["axes.prop_cycle"](), range(nb_samples)
      ):
          ax.add_patch(
              plt.Circle(
                  prng.normal(scale=3, size=2),
                  radius=1.0,
                  color=sty_dict["color"],
              )
          )
      ax.grid(visible=True)
  
      # Add title for enabling grid
      plt.title("ax.grid(True)", family="monospace", fontsize="small")
  
      ax.set_xlim([-4, 8])
      ax.set_ylim([-5, 6])
      ax.set_aspect(
          "equal", adjustable="box"
      )  # to plot circles as circles
      return ax
  
file_path: matplotlib/galleries/examples/style_sheets/style_sheets_reference.py
imports: import matplotlib.pyplot
  import numpy
  import matplotlib.colors
  from matplotlib.patches import Rectangle
label_desc: Use image node_id 4 for calling a global function with example usage: plot_colored_circles(ax, prng, nb_samples) and returns: ax