comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Vector legend with PARTVELVEC
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Vector legend with PARTVELVEC [message #84218] Sun, 05 May 2013 04:25
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 05/05/2013 12:26 AM, ljs15@fsmail.net wrote:
> Perhaps I misunderstand, but if you just want to draw a single arrowfor
> a legend, I would use cgArrow.pro (or arrow.pro), rather than partvelvec.

Yes, but the length of the arrow should correspond to the length of the
arrows drawn by partyvelec. Typically, you have a windfield to plot on
an image, and you now the (u,v) or your wind field and their (x,y)
positions in /data coordinates. for example, if your wind speed ranges
from 0 to 12. m.s-1, you might want to add a legend to your plot with an
arrow showing the length of a wind arrow of 10 m.s-1.

Anyways, I'll think about a version of partvelvec which provides an
ouptut structure (in /NORMAL coordinates) of the longest arrow it has
plotted and use cgArrow to draw the legend. This should be fine.

Thanks!
Re: Vector legend with PARTVELVEC [message #84223 is a reply to message #84218] Sat, 04 May 2013 15:26 Go to previous message
Sir Loin Steak is currently offline  Sir Loin Steak
Messages: 42
Registered: January 2012
Member
On Friday, May 3, 2013 6:25:08 PM UTC+1, wlandsman wrote:
> Perhaps I misunderstand, but if you just want to draw a single arrow for a legend, I would use cgArrow.pro (or arrow.pro), rather than partvelvec.
>
>
>
> --Wayne
>
>
>
> On Friday, May 3, 2013 12:43:11 PM UTC-4, Fabien wrote:
>
>> Hey IDLers,
>
>>
>
>>
>
>>
>
>> Maybe I haven't been searching hard enough but I did not find a way to
>
>>
>
>> use PARTVELVEC to draw only one vector as a legend vector. I guess I
>
>>
>
>> could do this myself by making my own partvelvec routine, but I thought
>
>>
>
>> this would be something the community might already have done.
>
>>
>
>>
>
>>
>
>> It is not that trivial since partvelvec draws in DATA coordinates, while
>
>>
>
>> the legend vector should be plotted outside the image. And the length of
>
>>
>
>> the legend should correspond to that of the plot of course ;-). I think
>
>>
>
>> this can only be done by modifying partvelvec so that it returns
>
>>
>
>> "something" that can be used to plot a legend afterwards. Like:
>
>>
>
>>
>
>>
>
>> cgImage, myImage
>
>>
>
>> partvelvec, vx, vy, px, py, /OVER, LEGEND_struc=legend ;output
>
>>
>
>> partvelvec_legend, legend, POSITION=poslegend, etc.
>
>>
>
>>
>
>>
>
>> Anyways, if someone did this already and is willing to share I would be
>
>>
>
>> very thankful. If not, I'm open to suggestions on how to do this the
>
>>
>
>> right way ;)
>
>>
>
>>
>
>>
>
>> Cheers,
>
>>
>
>>
>
>>
>
>> Fab

No, I think he wants to plot vectors with partvelvec, and also plot a vector outside the plot range to use as a legend (so you know what wind speed etc. the vector lengths represent).

I wanted to do something similar myself but couldn't think how, so in the plot description I just wrote 'the length of largest vector represents wind speeds of ...'. Not ideal, but I was in a rush!
Re: Vector legend with PARTVELVEC [message #84231 is a reply to message #84223] Fri, 03 May 2013 10:25 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
Perhaps I misunderstand, but if you just want to draw a single arrow for a legend, I would use cgArrow.pro (or arrow.pro), rather than partvelvec.

--Wayne

On Friday, May 3, 2013 12:43:11 PM UTC-4, Fabien wrote:
> Hey IDLers,
>
>
>
> Maybe I haven't been searching hard enough but I did not find a way to
>
> use PARTVELVEC to draw only one vector as a legend vector. I guess I
>
> could do this myself by making my own partvelvec routine, but I thought
>
> this would be something the community might already have done.
>
>
>
> It is not that trivial since partvelvec draws in DATA coordinates, while
>
> the legend vector should be plotted outside the image. And the length of
>
> the legend should correspond to that of the plot of course ;-). I think
>
> this can only be done by modifying partvelvec so that it returns
>
> "something" that can be used to plot a legend afterwards. Like:
>
>
>
> cgImage, myImage
>
> partvelvec, vx, vy, px, py, /OVER, LEGEND_struc=legend ;output
>
> partvelvec_legend, legend, POSITION=poslegend, etc.
>
>
>
> Anyways, if someone did this already and is willing to share I would be
>
> very thankful. If not, I'm open to suggestions on how to do this the
>
> right way ;)
>
>
>
> Cheers,
>
>
>
> Fab
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: dialog_pickfile bug?
Next Topic: Re: dialog_pickfile bug?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:44:27 PDT 2025

Total time taken to generate the page: 0.00830 seconds