필터 지우기
필터 지우기

change scientific notation in my plot

조회 수: 96 (최근 30일)
Jose Angel Moraga
Jose Angel Moraga 2021년 7월 18일
댓글: Star Strider 2021년 7월 19일
Hello:
I've been trytin to plot a map in UTM coordinates but the plots are shown in scientific notation. I want to remove it and show the numbers as int or float, for example: 5609935 and 357462
My code is:
figure(2)
plot(gtsam(:,2),gtsam(:,3));
grid on
I've been also trying with:
figure(2)
plot(gtsam(:,2),gtsam(:,3),'b');
YAxis.Exponent = 0;
XAxis.Exponent = 0;
xtickformat('%.0f')
grid on
with the following result:
My matlab version is R2021a
Thanks for yout time!

채택된 답변

Star Strider
Star Strider 2021년 7월 18일
Change the NumericRulerProperties Exponent property to get the result you want —
t = linspace(0, 5);
x = 1E+5*exp(-0.1*t) .* cos(2*pi*t);
y = 1E+5*exp(-0.1*t) .* sin(2*pi*t);
figure
plot(x, y)
grid
axis('equal')
Ax = gca;
Ax.XAxis.Exponent = 0;
Ax.YAxis.Exponent = 0;
.
  댓글 수: 2
Jose Angel Moraga
Jose Angel Moraga 2021년 7월 19일
hey! Thanks for your answer. At the end my code is:
% Avoid exponential notation
axis('equal')
Ax = gca;
Ax.XAxis.Exponent = 0;
Ax.YAxis.TickLabelFormat='%d'
Ax.YAxis.Exponent =0;
Thanks for yur help!
Star Strider
Star Strider 2021년 7월 19일
As always, my pleasure!
.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by