필터 지우기
필터 지우기

Display Scale on Quiver Plot

조회 수: 47 (최근 30일)
Jack B
Jack B 2015년 2월 15일
댓글: kalani Lakshani 2021년 3월 4일
Hello,
I'm looking to display the scale of my arrows on a quiver plot I've produced in relation to the plot itself. So the reader can look at my arrows and understand how they're size relate to the axis of the plot. I hope I'm being clear. Let me know if I'm not.
I basically don't know how to do this. Can anyone offer some suggestions or tips to make this happen.
Jack.

답변 (2개)

Felipe Breton
Felipe Breton 2018년 12월 20일
I had the same need, so what I did was to add one extra point in my map with a reference velocity. Then I added some text close to this "reference arrow" to explain it. Of course, some empty space on the map is needed. Basically, it would be as follows:
Taking the example shown in quiver.m 's reference page:
[x,y] = meshgrid(0:0.2:2,0:0.2:2);
u = cos(x).*y;
v = sin(x).*y;
figure
But then:
%An additional row of points is added at y=2.2:
[X,Y]=meshgrid([0:0.2:2],2.2);
%Then a reference arrow velocity is defined at x=0.2 and y=2.2, while rest of points are left as zero:
u_rf=zeros(1,11);
v_rf=zeros(1,11);
u_rf(1,2)=1;
%Thus, quiver plot is applied including the new row:
quiver([X;x],[Y;y],[u_rf;u],[v_rf;v]); %is done like this to be sure we got the same arrow AutoScale
%Finally some text is included:
text(0.05,2.3,'Arrow scale: 1m/s')
Resulting in the following plot:
example ref arrow.bmp
I hope it may help someone, as this post it quite old.
Felipe.

Star Strider
Star Strider 2015년 2월 15일
I never thought about doing that with quiver. I’m not certain that what you want to do is possible, but experiment with Quiver Series Properties, specifically those listed under ‘Arrow’.
  댓글 수: 3
Star Strider
Star Strider 2015년 2월 15일
My pleasure!
The arrow lengths scale themselves, so I’m not certain exactly how you would display the scale on a legend or some such. I’ve never see this addressed anywhere, and I've never done it myself. I occasionally turned the 'AutoScale','off' to show the arrows for short segments (where the arrows might not otherwise be visible), but otherwise I just let them alone.
kalani Lakshani
kalani Lakshani 2021년 3월 4일
Hello @Jack B
Can I know whether you found the answer for your question?

댓글을 달려면 로그인하십시오.

카테고리

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