title: Plotting a line from a coordinate with and angle
body: <p>I basically want to plot a line from a coordinate (x, y) with a given angle (calculating the tangent value). </p>
  
  <p>With a simple line of code like this <code>pl.plot([x1, x2], [y1, y2], 'k-', lw=1)</code> I can plot a line between two points but for this I need to calculate (x2, y2) coordinate. My (x1, y1) coordinate is fixed and the angle is known. Calculating (x2, y2) causes a problem at some point so I just want to plot the line from (x1, y1) with an angle (and preferably with a length).</p>
  
  <p>The simplest solution I came up with that was to use point-slope function which is <code>y - y1 = m(x - X1)</code>. Interpreting thiss and searching a little I used this piece of code:</p>
  
  <pre><code>x1 = 10
  y1 = -50
  angle = 30
  
  sl = tan(radians(angle))
  x = np.array(range(-10,10))
  y = sl*(x-x1) + y1
  
  pl.plot(x,y)
  pl.show
  </code></pre>
  
  <p>sl is here slope and x1 and y1 are the coordinates. I needed to explain myself since this found to be a poor question.</p>
  
  <p>So now, any ideas on how I can do/solve that?</p>