title: How to fit the end of line labels when using ax.annotate?
body: <p>I have this chart which I'm quite happy with except that I cannot fit 4 labels at the end of the lines and it does not look good when I am saving it as a pdf.</p>
  <p><a href="https://i.stack.imgur.com/POscY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/POscY.jpg" alt="mychart" /></a></p>
  <p>I have already tried changing figsize to figsize=(9,6), and xy=(0.984,y) in ax.annotate and this is as good as I can get.</p>
  <p>what else can I tweak to make the labels on the right more visible?</p>
  <p>My code.</p>
  <pre><code>import matplotlib.pyplot as plt
  import matplotlib.transforms as mtrans
  from matplotlib.ticker import FixedLocator, FormatStrFormatter
  #%matplotlib notebook
  plt.style.use('seaborn-poster')
  
  fig,ax = plt.subplots(figsize=(8,6), facecolor='w', edgecolor='blue')
  
  my_colors=['orangered','seagreen', 'goldenrod', 'darkviolet',  'sienna']
  
  ax.set_ylim(merged.min().min(), merged.max().max()) 
  ax.set_ylim(-0.7, 31)  
  
  ax=merged.plot(y=['Kinver', 'Nomads', 'Plough', 'Alveley Royals', 'Alveley Oaks'],marker='o',figsize=(9,6),legend=None, color=my_colors, ax=ax)
  
  selectcols=merged[['Kinver', 'Nomads', 'Plough', 'Alveley Royals', 'Alveley Oaks']]
  
  for line, name in zip(ax.lines, selectcols.columns):
  
      y = line.get_ydata()[-1]
      ax.annotate(name, xy=(0.984,y), xytext=(6,0), color=line.get_color(), 
                  xycoords = ax.get_yaxis_transform(), textcoords=&quot;offset points&quot;,
                  size=14, va=&quot;center&quot;)
  
  merged.plot(y='Footloose', marker='o', figsize=(9,6), legend=None, color= 'steelblue', ax=ax, alpha=1,
                      transform=mtrans.offset_copy(ax.transData, fig=fig, x=0.0, y=4, units='points'))   
  
  y = 12
  ax.annotate('Footloose', xy=(0.984,y), xytext=(6,0), color='steelblue', 
                  xycoords = ax.get_yaxis_transform(), textcoords=&quot;offset points&quot;,
                  size=14, va=&quot;center&quot;)
  
  merged.plot(y=['Top Pub'], marker='o', figsize=(9,6), legend=None, color= 'darkred', ax=ax, alpha=1,
                      transform=mtrans.offset_copy(ax.transData, fig=fig, x=0.0, y=3*(1), units='points'))      
  y = 22
  ax.annotate('Top Pub', xy=(0.984,y), xytext=(6,0), color='darkred', 
                  xycoords = ax.get_yaxis_transform(), textcoords=&quot;offset points&quot;,
                  size=14, va=&quot;center&quot;)
  
  y = 2
  merged.plot(y='Gaters', marker='o', figsize=(9,6), legend=None, color= 'springgreen', ax=ax, alpha=1,
                      transform=mtrans.offset_copy(ax.transData, fig=fig, x=0.0, y=-1.8, units='points'))  
  ax.annotate('Gaters', xy=(0.984,y), xytext=(6,0), color='springgreen', 
                  xycoords = ax.get_yaxis_transform(), textcoords=&quot;offset points&quot;,
                  size=14, va=&quot;center&quot;)
  
  ax.spines['top'].set_visible(False)
  ax.spines['bottom'].set_visible(False)
  ax.spines['right'].set_visible(False)
  ax.spines['left'].set_visible(False)
  
  fig.text(0.25, 0.95, &quot;Clubs  of&quot;, ha=&quot;center&quot;, va=&quot;bottom&quot;, size=17,color=&quot;black&quot;)
  fig.text(0.34, 0.95, &quot;S&quot;, ha=&quot;center&quot;, va=&quot;bottom&quot;, size=21,color=&quot;blue&quot;)
  fig.text(0.37, 0.95, &quot;V&quot;, ha=&quot;center&quot;, va=&quot;bottom&quot;, size=21,color=&quot;red&quot;)
  fig.text(0.40, 0.95, &quot;P&quot;, ha=&quot;center&quot;, va=&quot;bottom&quot;, size=21,color=&quot;gold&quot;)
  fig.text(0.43, 0.95, &quot;L&quot;, ha=&quot;center&quot;, va=&quot;bottom&quot;, size=21,color=&quot;darkgreen&quot;)
  fig.text(0.59, 0.95,&quot;in years 2014-2019&quot;, ha=&quot;center&quot;, va=&quot;bottom&quot;, size=17,color=&quot;black&quot;)
  
  x_axis = ax.axes.get_xaxis()
  x_label = x_axis.get_label()
  x_label.set_visible(False)
  ax.set_ylabel('Points won', color='darkblue',  fontdict={'fontsize': 14, 'fontweight': 'medium'})
  
  years=[2014,2015, 2016,2017,2018, 2019]
  plt.xticks(range(len(years)),(years))
  plt.margins(x=0.012,y=0.2)
  
  ax.get_xaxis().tick_bottom()
  #ax.get_yaxis().tick_left()
  
  ax.tick_params(axis='y', which='major', labelsize=12,bottom=False, top=False, labelbottom=True,
                 left=False, right=False, labelright=False)
  ax.tick_params(axis='x', which='major', labelsize=14,bottom=False, top=False, labelbottom=True,
                 left=False, right=False, labelright=False)
  #fig.subplots_adjust(left=.06, right=.75, bottom=0, top=.94)
  ax.yaxis.set_major_formatter(plt.FuncFormatter('{:.0f}'.format))
  ax.grid(True, 'major', 'y', ls='--', lw=.6, c='darkgray', alpha=.5)
  
  plt.show()
  
  plt.savefig('SVPLclubs1.pdf')
  </code></pre>
  <p>Thank you!</p>