Re: Line plot with arrows [message #77779] |
Mon, 26 September 2011 02:58  |
Fabzou
Messages: 76 Registered: November 2010
|
Member |
|
|
Hi,
I think that PARTVELVEC from the IDL Astro Lib is more adapted.
http://idlastro.gsfc.nasa.gov/ftp/pro/plot/partvelvec.pro
Via the /DATA keyword, you may place your arrows the way you want to,
but this may be a bit tricky regarding the directions, I don't know how
PARTVELVEC may react in /DATA space... But probably pretty good I am sure.
The major problem with VELOVECT is that it exepects you to plot nice
regular 2-D Grids, which is probably not the case here.
Besides, PARTVELVEC is highly CG compatible ;)
Fabz
On 09/22/2011 09:37 PM, Russell wrote:
> On Sep 22, 11:20 am, Robin Wilson<ro...@rtwilson.com> wrote:
>> Hi all,
>>
>> I'm trying to use IDL (and specifically David's Coyote Graphics system)
>> to plot a line graph showing the passage of rays of light through a
>> modelled atmosphere. I can easily get the data out to plot a simple line
>> graph which joins up the points that the ray passed through, but I want
>> to be able to put arrows on the lines so that it can be seen which
>> direction the light is going.
>>
>> Is there any (relatively easy) way to put arrows on lines in a line plot
>> in IDL? Ideally I'd like to replace each segment of line with an arrow,
>> but I guess I could have arrows just at each point instead. For the
>> latter I would think of overplotting some points, but I'd need to rotate
>> the arrows correctly each time, and I've no idea how to do that.
>>
>> Any ideas?
>>
>> Robin
>>
>> P.S. David - working on your review now (using the book as a reference
>> for programming today to test it out!)
>> ------------------
>> Robin Wilson
>> A PhD student studying complexity in remote sensingwww.rtwilson.com/academic
>
> Hi Robin.
>
> If I understand you correctly, you have a bunch of data (I'll call
> them x and y) which have vector directions associated with them (call
> them dx and dy). And you want to plot little arrows, where the tail
> of the arrow is at (x,y) and the length and direction of the arrow is
> somehow related to (dx,dy). Correct? If so then have a look at
> velovect.pro
>
> http://physics.nyu.edu/grierlab/idl_html_help/V5.html#wp7875 71
>
> Good luck, Russell
|
|
|