Not sure why x-axis of the plot is doing this...

조회 수: 3 (최근 30일)
yc j
yc j 2015년 6월 15일
댓글: yc j 2015년 6월 15일
Hello, I have several data files containing data of force and deflection. I'm simply plotting these two, and i get plot like below.
ok... nothing much there. all good.
but when i try some of the other data file, the plot comes out like below:
See the x-axis? it gives the value to 10^-3 rather than as a decimal number. How can this be fixed? I only want full numbers like 0.0035...

채택된 답변

Walter Roberson
Walter Roberson 2015년 6월 15일
I don't know about R2014b and later, but in earlier versions this behaviour is completely automatic and there is no option to display it. However, you can use
xt := get(gca,'XTick');
set(gca, 'XTickLabel', cellstr(num2str(xt(:),'%0.4f')) )
  댓글 수: 1
yc j
yc j 2015년 6월 15일
wow nice!!! Had to remove ':' in front of '=' though. Thank you very much!!!!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by