Is that possible to draw a scale bar in figure?

조회 수: 36 (최근 30일)
abuzer
abuzer 2013년 4월 3일
댓글: Image Analyst 2013년 11월 25일
I am using quiver function with scale factor 1. But for understand the differences between the points or precisely show the distances I need a scale bar which shows the scaling amount. how can I draw it in figure? By the way I am using coordinates with meter unit. And displacements are in cm level.
I tried these commands but it doesnt have a solution for me, any other ideas?
import data
data=x1;y1;v;u
plot(x1,y1,'o');
h=quiver(x1, y1, v, u, 1,'ShowArrowHead','off');
quiver(max(x1)+50,min(y1)+50,0,40,'>r','filled');
text(max(x1)-20,min(y1)+20,'Scale= 4 cm','Color','r','FontWeight','bold');
Thanks.

채택된 답변

Image Analyst
Image Analyst 2013년 11월 24일
  댓글 수: 2
abuzer
abuzer 2013년 11월 25일
Could you write a simple example about this function please? I think this is what I look for but I could not run it. Because I am new in matlab. Thank you
Image Analyst
Image Analyst 2013년 11월 25일
I have not downloaded but it loook like you can jsut do
SCALEBAR(haxesPlot, 'ScaleLength', 1, 'Northeast');
like it directs in the comments. Did you try that?

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

추가 답변 (2개)

Sean de Wolski
Sean de Wolski 2013년 4월 3일

abuzer
abuzer 2013년 11월 24일
I think this function needs grid references, but I need simple one, I've just reference coordinates and their displacements. how to figure out the results with scaled? thanks for answer

카테고리

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