why is it not possible to easily retrieve the auto-scaling factor used by quiver?

18 次查看(过去 30 天)
By default quiver autoscales so that vectors "do not overlap". The algorithm used is presumably non-trivial, but the result is a real scalar (right?) that would be useful to some users. I am making movies of vector fields and each snapshot has a different scale -- somehow displaying this scale would be useful! Also, the modeled fields are derived from fitting data, and I would like to plot the data (also vector fields at a small number of sites) with vectors of a different color. The easiest (by far) way to do this is with two calls to quiver, one with the models grided locations and vectors, the other with the same for the data. But unless autoscale is turned off, the quiver plots will use different scale factors. I am turning off autoscale, and using known fixed scales. But then I have to make my own algorithm to define the scale. In some cases it woud be nice to use your more complex auto-scale algortihm for the first call, retrieve the scale factor, and use that with autoscale turned off for the second quiver call (even if I have to do the scaling myself). Is there a good reason why this can't be a property (that can t be set) so a user could retrieve it and use it for subsequent additions to the plot?

回答(1 个)

Shubham
Shubham 2024-1-24
Hi Gary,
I understand that you are trying to retrieve the scale factor used by “quiver” with “Autoscaling” option turned on and then use it for manually scaling subsequent quiver plot with the “Autoscaling” option disabled.
When creating a Quiver plot, there are two separate scaling operations that take place. Initially, the arrow lengths are adjusted to fit inside the plot area without overlapping. After that, scaling is carried out in accordance with the 'AutoScale' and 'AutoScaleFactor' attributes.
I hope this helps.
  1 个评论
Gary Egbert
Gary Egbert 2024-1-26
yeah I know all of that, and figured out ways to get around the limitations of the existing matlab software. My questions was more directed to Mathworks --why the limitiation. Really more of a suggestion for futher improvements, for what it is worth.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Vector Fields 的更多信息

标签

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by