title: Python: plot shown differently in pyplot than in tkinter?
body: <p>I wanted to add some comments outside the plots. The code and figures are d below. The problem is that fig2 essentially the same but with the "text1" and "text2" cut off. Can anybody explain why or provide a better solution of adding texts outside the plot? Thanks a lot!</p>
  
  <pre><code>import matplotlib.pyplot as plt
  from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
  import numpy as np
  
  import Tkinter as Tk
  root = Tk.Tk()
  
  x = np.arange(0, 10, 1)
  y = np.arange(0, 10, 1)
  
  fig1 = plt.figure()
  ax = fig1.add_subplot(111)
  ax.plot(x,y)
  textx = ax.get_xlim()[0]
  texty = ax.get_ylim()[0]
  ydist = ax.get_yticks()[1] - ax.get_yticks()[0]
  ax.text(textx, texty-2*ydist, "text1")
  ax.text(textx, texty-3*ydist, "text2")
  fig1.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/QIVoS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QIVoS.png" alt="enter image description here"></a></p>
  
  <pre><code>fig2 = plt.Figure()
  ax2 = fig2.add_subplot(111)
  ax2.plot(x,y)
  textx = ax2.get_xlim()[0]
  texty = ax2.get_ylim()[0]
  ydist = ax2.get_yticks()[1] - ax2.get_yticks()[0]
  ax2.text(textx, texty-2*ydist, "text1")
  ax2.text(textx, texty-3*ydist, "text2")
  canvas = FigureCanvasTkAgg(fig2, master=root)
  canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1.0)
  canvas.show()
  canvas.draw()
  Tk.mainloop()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Quh5e.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Quh5e.jpg" alt="enter image description here"></a></p>