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

Home » Public Forums » archive » Drawing vector fields with New Graphics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Drawing vector fields with New Graphics [message #85084 is a reply to message #85082] Tue, 02 July 2013 11:15 Go to previous messageGo to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
On Tuesday, July 2, 2013 12:54:36 PM UTC-5, Gordon Farquharson wrote:

> I'm not so scared by this note. The length of a vector in the vector field doesn't have anything to do with the spatial coordinates in which the vector field is plotted. One typically scales vector lengths to make the vector field pretty (easy to read). As I understand it, this automatic scaling is what the vector routine is doing quite conveniently, so I can see that this automatic scaling is useful for a single vector field because it makes the vector field fit in the area nicely. But the second vector field should use the same scaling factor, or at least, there should be an option to reuse the scaling factor computed form the first vector field.
>

Chacun a son gout, I guess. I would like to have some sort of control of the length of the vectors, using vx, vy.


>
> Did you mean something like:
>
> vmag = mean(sqrt(vx^2 + vy^2))
>
>
> vx /= vmag
> vy /= vmag
>
> v2.length_scale = 2
>
> This version produces vectors in v1 and v2 that are the same length! The scaling does not seemed to be maintained between calls to vector.
>

Not exactly what I was thinking. Defining v1 sets the "units" of the length_scale. You then set the "unit" to be 2 tics with v1.length_scale=2

If instead of dividing the vx, vy by the magnitude, instead try

v2.length_scale = 2/vmag

I think this is what you're looking for....at least for this example.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: peak analysis
Next Topic: IDLWAVE

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

Current Time: Sat Oct 11 03:42:22 PDT 2025

Total time taken to generate the page: 0.55654 seconds