Impossible to draw a direction of arrows in Python???

Hi, I have encountered some problem while I was drawing a direction of arrow. I have point (x,y) coordinates and angle of them. What I want to do is that to draw arrow according to the given angle (just to show the point direction as an arrow in each point coordinate). Here, we should assume coordinates of '+x', '+y', '-x ', '-y' are 90, 0, 270, 180 degrees, respectively. I am a bit unfamiliar with Python drawing tools. I am still not sure to draw directional point (arrow based on angle) whether I use pylab or some other modules or.. still not sure at all. I put the following codes as a sample to give better description: import numpy as np import scipy as sp import pylab as pl def draw_line(x,y,angle): # Inputs: x = np.array([ 2, 4, 8, 10, 12, 14, 16]) y = np.array([ 5, 10, 15, 20, 25, 30, 35]) angles = np.array([45,275,190,100,280,18,45]) # First, draw (x,y) coordinate ??? # Second, according to the angle indicate the direction as an arrow ??? Thanks in advance for your friendly support, -- happy Man

Hi, I have encountered some problem while I was drawing a direction of arrow. I have point (x,y) coordinates and angle of them. What I want to do is that to draw arrow according to the given angle (just to show the point direction as an arrow in each point coordinate). Here, we should assume coordinates of '+x', '+y', '-x ', '-y' are 90, 0, 270, 180 degrees, respectively. I am a bit unfamiliar with Python drawing tools. I am still not sure to draw directional point (arrow based on angle) whether I use pylab or some other modules or.. still not sure at all. I put the following codes as a sample to give better description:
import numpy as np import scipy as sp import pylab as pl
def draw_line(x,y,angle): # Inputs: x = np.array([ 2, 4, 8, 10, 12, 14, 16]) y = np.array([ 5, 10, 15, 20, 25, 30, 35]) angles = np.array([45,275,190,100,280,18,45])
# First, draw (x,y) coordinate ??? # Second, according to the angle indicate the direction as an arrow ???
Thanks in advance for your friendly support,
Hi Happyman, your question would be better suited to the matplotlib-users mailing list, pleaes re-post there. I think mpl has a quiver method to do what you want, but I'm not sure. Check the docs at matplotlib.org. Cheers, A.

On Fri, Apr 12, 2013 at 2:34 AM, Happyman <bahtiyor_zohidov@mail.ru> wrote:
I have encountered some problem while I was drawing a direction of arrow.
What are you drawing with? numpy has nothign to do with drawing. It's likely that matplotlib is a good choice, if you are doing genreal plotting, and not jsut frawing an arrow. Otherwise, each GUI toolkit has custom drawing, or you can draw to a ini-memory image (and save as PNG, pdf, etc) with pyCairo, PIL, pyGD, .... But not of that is numpy. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
participants (3)
-
Andreas Hilboll
-
Chris Barker - NOAA Federal
-
Happyman