title: Get X,Y Position in Figure (not in Plot)
body: <p>I have a question about the X and Y Position in figures. How you can see I am working with gridspec for a better layout and adding Text to a figure. The problem is that I am trying to get the exact Position manually. Which means I am changing the X and Y in <code>fig.text(0.2, 0.5, 'matplotlib') </code> until I get the final figure.</p>
  <p><a href="https://i.stack.imgur.com/vMRi2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vMRi2.png" alt="enter image description here" /></a></p>
  <pre><code>import matplotlib.pylab as plt
  import numpy as np
  
  vector = np.arange(0,100)
  time = np.arange(0,vector.shape[0])
  
  fig = plt.figure(figsize=(10,10))
  plt.rcParams['axes.grid'] = True
  gs = fig.add_gridspec(2, 2)
      
  ax1 = fig.add_subplot(gs[0, :])        
  ax1.plot(time,vector)  
  fig.text(0.2, 0.5, 'matplotlib') 
  </code></pre>
  <p>At <a href="https://stackoverflow.com/questions/29379502/how-get-a-x-y-position-pointing-with-mouse-in-a-interactive-plot-python">Link</a> I already found an interactive solution but its only working for the Plot.</p>
  <p>Does someone have an idea how to manage this?</p>