'Clipping' the quiver plot

5 次查看(过去 30 天)
I have a quiver plot in which some of the arrows are on the edge of the plot and pointing outwards. The portion of quiver arrows that are outside of the plot limit are invisible. I want to make that visible.
My research shows that there is a 'Clipping' option for quiver, it seems that by turning the 'Clipping' off, I will get what I want. However 'Clipping' off does not make any difference? What do I miss? Thanks.

采纳的回答

Sean de Wolski
Sean de Wolski 2014-11-25
编辑:Sean de Wolski 2014-11-25
In R2014b, turning the clipping off works as I would expect:
quiver(0.5,0.5,1,1)
axis([0 1 0 1])
ax = gca;
ax.Clipping = 'off';

更多回答(2 个)

Peng
Peng 2014-11-27
The problem was I'm using 2013, and after switching to 2014, it works. Thanks.

William Thielicke
William Thielicke 2021-7-16
When anything uses "axis image", then it is not possible to disable clipping anmore... Is this desired behaviour?
figure;
imagesc(rand(100,100));hold on;
quiver(rand(100,100),rand(100,100)*20,'Autoscale','off');hold off;
axis off;
axis image;
set(gca,'Clipping','on')
This doesn't work. It only works like this:
figure;
imagesc(rand(100,100));hold on;
quiver(rand(100,100),rand(100,100)*20,'Autoscale','off');hold off;
axis off;
%axis image;
set(gca,'Clipping','on')
  6 个评论
William Thielicke
William Thielicke 2022-5-25
Adding axis equal seems to be a workaround... So it is a bug?
Bjorn Gustavsson
Bjorn Gustavsson 2022-5-25
Definitely a "feature". Make a bug-report, or enhancement request, whatever it's called.

请先登录,再进行评论。

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by