Message Boards Message Boards

0
|
2565 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Consistent vector length across plots using VectorPlot[ ]?

Posted 2 years ago

Hello,

I am plotting some 2D vector fields using VectorPlot. I want to be able to compare the field magnitude at different points visually, and color is not an option so scaling the vector lengths seems appropriate. This can be achieved with the VectorScaling option but the result is normalized over each plot. It looks like the older version VectorScale could do what I want (using sfun), but this has since replaced by VectorScaling which gives me less options.

It seems to me that what I am trying to do is very basic, but I can't figure out how to do it. Does anyone have any ideas? This post https://mathematica.stackexchange.com/questions/14439/how-to-scale-vectors-in-vectorplot shows one way to do what I want with ListVectorPlot and the old VectorScale option.

Thanks in advance.

POSTED BY: Tobias Eklund
2 Replies

You should add the option https://reference.wolfram.com/language/ref/VectorRange.html VectorRange. If you apply the same range for each plot it should be consistent.

POSTED BY: Sander Huisman
Posted 2 years ago

Yes! This seems to work. I would never have guessed that's what I needed to do. Thank you!

POSTED BY: Tobias Eklund
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract