title: How to add box and label to pie graph exactly as shown in figure below
body: <p>Trying to create a graph exactly like in figure below and want to save it as jpeg.
  I have a dataframe named 'custpref' as below</p>
  
  <pre><code>tov_type            count
  Inpatient               7
  Office Visit            6
  Appointment Schedule    1
  Allergy Sheet           1
  </code></pre>
  
  <p>Tried Code is as follows:-</p>
  
  <pre><code>def addPieGraph():
  # Create a list of colors (from iWantHue)
  colors = ["#6287da","#72ac5c","#8653aa","#bb7438","#b94b75"]
  
  # Create a pie chart
  plt.pie(
      # using data total)arrests
      custpref['cnt'],
      # with the labels being officer names
      labels=custpref['tov_type'],
      # with no shadows
      shadow=False,
      # with colors
      colors=colors,
      # with the start angle at 90%
      startangle=90,
  )
  
  # View the plot drop above
  plt.axis('equal')
  
  # View the plot
  plt.tight_layout()
  plt.title("Top 5 Visit Types                  Total = 15 Visits")
  plt.savefig(r"PieChart.png",bbox_inches="tight")
  plt.show()
  </code></pre>
  
  <p>expected result:-
  <a href="https://i.stack.imgur.com/Qdslw.png" rel="nofollow noreferrer">expected look of pie graph</a></p>
  
  <p>The code above plots the pie graph just need help with the legends,arrows pointing to them, the count in front of names and label in rectangular box with border around the graph as in expected output.</p>
  
  <p>(legands from above dataframe and expected graph may vary as it changes for each graph. I am expecting just exact look for my graph as shown in expected image.)</p>