Why does autoscaling the axes not work correctly when using QUIVER with a marker style specification in MATLAB 7.0 (R14)?

4 views (last 30 days)
When I generate a quiver plot in MATLAB 7.0 (R14) and specify a marker style, the plot always scales to include the point (0,0) even if my data is not near that point.
For example, executing the following code creates a plot with the X limits from 0 to 7, even though the data is limited to 5 and 7.
quiver([5 6],[1 2],[1 1],[1 1],'x')

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
We have verified that there is a bug in MATLAB 7.0 (R14) in the way that QUIVER handles marker styles. To work around this issue, use the 'v6' flag in the call to QUIVER:
quiver('v6',x,y,u,v)
Another option is to specify the marker style after creating the plot. To do this, use the following commands:
h = quiver(x,y,u,v);
set(h,'Marker','o')
Finally, you can manually specify the axis limits using the AXIS command:
axis([XMIN XMAX YMIN YMAX])
or by setting the axes XLim and YLim properties:
set(gca,'XLim',[XMIN XMAX],'YLim',[YMIN YMAX])
For more information on the AXIS command, enter
doc axis
at the MATLAB command prompt. For more information on the properties of axes objects, enter
doc axes

More Answers (0)

Categories

Find more on Vector Fields in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!