title: Python Lollipop Plot, write label on line
body: <p>I'm trying to replicate the type of plot <a href="https://www.who.int/news-room/fact-sheets/detail/the-top-10-causes-of-death" rel="nofollow noreferrer">here</a>.</p>
  <p>I have this code:</p>
  <pre><code>import numpy as np
  import pandas as pd
  import matplotlib.pyplot as plt
   
  # Create a dataframe
  #value1=np.random.uniform(size=20)
  #value2=value1+np.random.uniform(size=20)/4
  #df = pd.DataFrame({'group':list(map(chr, range(65, 85))), 'value1':value1 , 'value2':value2 })
  df = pd.read_csv('table_for_disease.txt', sep='\t')
  print(df)
   
  
  # Reorder it following the values of the first value:
  ordered_df = df.sort_values(by='2000')
  my_range=range(1,len(df.index)+1)
   
  # The horizontal plot is made using the hline function
  plt.hlines(y=my_range, xmin=ordered_df['2000'], xmax=ordered_df['2019'], color='grey', alpha=0.4)
  plt.scatter(ordered_df['2000'], my_range, color='blue', alpha=1, label='2000')
  plt.scatter(ordered_df['2019'], my_range, color='red', alpha=1 , label='2019')
  plt.legend()
   
  # Add title and axis names
  plt.yticks(my_range, ordered_df['Disease'])
  plt.title(&quot;Comparison of leading global causes of death in 2000 and 2019&quot;, loc='center')
  plt.xlabel('Number of deaths (millions)')
  plt.ylabel('Disease')
  
  # Show the graph
  plt.show()
  </code></pre>
  <p>The output is:</p>
  <p><a href="https://i.stack.imgur.com/8C4MT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8C4MT.png" alt="enter image description here" /></a></p>
  <p>As you can see the image is very stretched. Could someone demonstrate how to write the Y labels on top each of the lines, as per the original example <a href="https://www.who.int/news-room/fact-sheets/detail/the-top-10-causes-of-death" rel="nofollow noreferrer">here</a>.</p>