title: Plot over an image background in python
body: <p>I would like to plot a graph over an image background using matplotlib. I found how to do it in matlab <a href="http://www.peteryu.ca/tutorials/matlab/plot_over_image_background" rel="noreferrer">http://www.peteryu.ca/tutorials/matlab/plot_over_image_background</a></p>
  
  <p>I've tried something basic like this:</p>
  
  <pre><code>im = plt.imread("dd.png")
  implot = plt.imshow(im)
  theta=np.linspace(0,2*np.pi,50)
  z=np.cos(theta)*39+145
  t=np.sin(theta)*39+535-78+39
  plt.plot(z,t)
  plt.show()
  </code></pre>
  
  <p>but it gave me something really ugly:</p>
  
  <p><img src="https://i.stack.imgur.com/iZ7MM.png" alt="something really ugly"></p>