title: Draw arrow in matplotlib
body: <p>Consider the following example:
  This code will create an circle with center 180, 150 and radius 15. Further a point will be added at position a,b. </p>
  
  <pre><code>%matplotlib inline
  import matplotlib.pyplot as plt
  import math
  import numpy as np
  
  def get_circle(x, y, r):
      """ Get a cirlce with a specific position and radius"""
      result = plt.Circle((x, y), r, color='k', fill=False)
      return result
  
  def rpoint(x, y, r, deg):
      """ Get a point on a radius at deg degrees."""
      rang = np.deg2rad(deg)
      x1 = x + r * np.sin(rang)
      y1 = y + r * np.cos(rang)
      return (x1, y1)
  
  fig, ax = plt.subplots(1, 1, figsize=(6,6))
  
  ax.set_aspect('equal', adjustable='datalim')
  ax.axes.get_xaxis().set_visible(False)
  ax.axes.get_yaxis().set_visible(False)
  
  x1, y1, r = 180, 150, 15
  ax.add_patch(get_circle(x1, y1, r))
  a, b = rpoint(x1, y1, r, 180)
  plt.plot(a,b,'ok')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/NlGhz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NlGhz.png" alt="enter image description here"></a></p>
  
  <p>Now i want simply to add an arrow that shows in the direction of the black dot with half the radius. From the <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.arrow.html" rel="nofollow noreferrer">docs</a> i tried to add the desired arrow in the following way.</p>
  
  <pre><code>plt.arrow(x1, y1, a, b)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>plt.arrow(x1, y1, x1 + abs(x1 - a), y1 + abs(y1 - b))
  </code></pre>
  
  <p>Both ways result in the same result:</p>
  
  <p><a href="https://i.stack.imgur.com/TmSsr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TmSsr.png" alt="enter image description here"></a></p>
  
  <p>The arrows direction and length is completely wrong even though i used the correct coordinates a,b. What am I doing wrong? </p>