title: How do I convert x, y coordinates from one graph with a small scale to a new matplotlib graph of a much greater size?
body: <p>I am using tkinter to manually draw lines on a canvas then record the x, y coordinates. I'd like to convert those x,y coordinates to a very differently scaled canvas and plot them using matplotlib. My tkinter canvas currently is sized 690(x) x 490(y). I'd like to convert those coordinates to a graph with the dimensions of x(ranging from -5300 to 5300) and y(ranging from -3650 to 3650) with zero being the center of the graph. How do I do that range/scale conversion? Thanks!</p>
  <p>Current tkinter canvas coordinate range:</p>
  <pre><code>root = tk.Tk()
  background_image=tk.PhotoImage(file=&quot;Pitch2.png&quot;)
  root.resizable(width=True, height=True)
  root.wm_attributes(&quot;-topmost&quot;, 1)
  canvas = tk.Canvas(root, bg=&quot;white&quot;, width=690, height=560)
  </code></pre>
  <p>Desired matplotlib range:</p>
  <pre><code>fig,ax = plt.subplots()
  plt.ylim(-3650, 3650)
  plt.xlim(-5300, 5300)
  filename = os.path.join(os.getcwd(),'Pitch.png')
  im = plt.imread(filename)
  graph_2, = ax.plot([], marker='.')
  </code></pre>