Why doesn't the quiver object property MaxHeadSize work?

38 ビュー (過去 30 日間)
Kevin J. Delaney
Kevin J. Delaney 2015 年 5 月 11 日
編集済み: Walter Roberson 2016 年 7 月 4 日
Changing the quiver object property MaxHeadSize has no effect on the displayed quiver object.
  1 件のコメント
Hannah Nissan
Hannah Nissan 2016 年 7 月 4 日
編集済み: Walter Roberson 2016 年 7 月 4 日
I still find this problem, using 2016a. I am able to change the arrow head size using the test code:
q = quiver(1:10,1:10);
%Observe the figure after doing each of these
q.MaxHeadSize = 0.1;
q.MaxHeadSize = 0.01;
q.MaxHeadSize = 0.5;
but can't get it any larger than 0.5. For my data, this makes it impossible to see which direction the arrow is pointing...
Any suggestions?

サインインしてコメントする。

回答 (3 件)

Dasharath Gulvady
Dasharath Gulvady 2015 年 5 月 12 日
  2 件のコメント
Kevin J. Delaney
Kevin J. Delaney 2015 年 5 月 12 日
I'm using R2015a.
Dasharath Gulvady
Dasharath Gulvady 2015 年 5 月 15 日
編集済み: Dasharath Gulvady 2015 年 5 月 15 日
Can you share a sample code with which you can see the issue? Which operating system are you on?

サインインしてコメントする。


Abhiram Bhanuprakash
Abhiram Bhanuprakash 2015 年 5 月 13 日
Hi Kevin,
I tried the following in MATLAB R2015a and it worked:
q = quiver(1:10,1:10);
%Observe the figure after doing each of these
q.MaxHeadSize = 0.1;
q.MaxHeadSize = 0.01;
q.MaxHeadSize = 0.5;
If you find that this example works and you are facing issues with the particular figure which you have, can you please share your code (and data) so that I can reproduce the issue at my end?
Hope this helps,
Abhiram.
  1 件のコメント
Kevin J. Delaney
Kevin J. Delaney 2015 年 5 月 13 日
Abhiram: Thanks for your answer. Yes, I see the arrowhead sizes changing in your example, but nothing changes once MaxHeadSize reaches 0.5.
I can shrink the head sizes, but can't expand them past 0.5--and that would be useful to make them more prominent in my application (please see the attached figure file). Prior to R2014b, I was able to get to the arrowheads and manipulate them directly.
Thanks, Kevin

サインインしてコメントする。


Julian Hapke
Julian Hapke 2016 年 4 月 7 日
Here's my findings... Testcode:
function tst
close all
figure(3)
clf;
hold on
for ii = 1:15
quiver(ii/2, 0, 0, 1, 0, 'MaxHeadSize', ii/10);
end
for ii = 1:15
quiver(ii/2+0.125, 0, 0, 2, 0, 'MaxHeadSize', ii/10);
end
for ii = 1:15
quiver(ii/2+0.25, 0, 0, 3, 0, 'MaxHeadSize', ii/10);
end
figure(4)
clf;
hold on
for ii = 1:15
p = quiver(ii/2, 0, 0, 1, 0);
set(p,'MaxHeadSize', ii/10);
end
for ii = 1:15
p = quiver(ii/2+0.25, 0, 0, 2, 0);
set(p,'MaxHeadSize', ii/10);
end
figure(5)
[x,y] = meshgrid(0:0.2:2,0:0.2:2);
u = cos(x).*y;
v = sin(x).*y;
subplot(1,3,1)
quiver(x,y,u,v);
subplot(1,3,2)
quiver(x,y,u,v,'MaxHeadSize', 0.8);
subplot(1,3,3)
quiver(x,y,u,v,'MaxHeadSize', 5);
end
Prior to 2015a, the MaxHeadSize = 1 leads to wrong results if the length of the arrow is not 1, this is fixed with 2015a.
MaxHeadSize > 1.1 does not seem to have any effect (with the chosen data)
The MaxHeadSize Property does not have any effect on the example code taken from here

カテゴリ

Help Center および File ExchangeFormatting and Annotation についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by