title: How to draw a bracket for grouping subplots
body: <p>I would like to draw/plot a &quot;bracket&quot; (to keep it simple, it is a sequence of points that forms an arc) as shown in red in the first picture.</p>
  <p><a href="https://i.stack.imgur.com/wWWMo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wWWMo.png" alt="The figure where I want the bracket" /></a></p>
  <p>I created the bracket in another figure, but I do not know how to include/draw/plot it in the first figure. Here is the bracket, that would be transformed as needed to fit the space between the small labels and the group Labels.</p>
  <p><a href="https://i.stack.imgur.com/lxGCG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lxGCG.png" alt="The bracket" /></a></p>
  <p>Here is the MWE:</p>
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  fig, axs = plt.subplots(8, 1, figsize=(8,9), sharex=True)
  for i, ax in enumerate(axs.flat):
      ax.plot([1,2])
      ax.set_ylabel('Label ' + str(i))
  axs[7].set_xlabel('The common x Label')
  
  plt.annotate('Group Label (0,1,2,3)', xy=(.02, 0.7), rotation=90, xycoords='figure fraction',
              horizontalalignment='center', verticalalignment='center', fontsize=14, color='k')
  plt.annotate('Group Label (4,5,6,7)', xy=(.02, 0.3), rotation=90, xycoords='figure fraction',
              horizontalalignment='center', verticalalignment='center', fontsize=14, color='k')
  
  # Plot a 'bracket'
  plt.figure()
  npoints = 100
  td = np.linspace(np.pi*3/4, np.pi*5/4, npoints)
  xd = np.cos(td)
  yd = np.sin(td)
  plt.plot(xd,yd)
  </code></pre>
  <p><strong>Edit:</strong>
  I believe using a <em>PathPatch</em> would be the best solution, like in this <a href="https://matplotlib.org/stable/gallery/shapes_and_collections/path_patch.html" rel="nofollow noreferrer">Matplotlib example</a>. I just don't know how to do it.</p>