Why does autoscaling the axes not work correctly when using QUIVER with a marker style specification in MATLAB 7.0 (R14)?
5 次查看(过去 30 天)
显示 更早的评论
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')
采纳的回答
MathWorks Support Team
2009-6-27
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
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Vector Fields 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!