In y axis I want decimal places is it possible..
Y=[-0.0042 -0.0036] ## here also I m getting error
X=[8 9]
Plot(X, Y)
Y axis I should get in decimal places not in 3.6 e-03
Guidance needed version 2018a

 채택된 답변

Star Strider
Star Strider 2022년 5월 9일

0 개 추천

Try this —
Ax = gca;
Ax.YAxis.Exponent = 0;
I checked, and this will work in R2018a according to the R2018a NumericRuler Properties documentation.
Y=[-0.0042 -0.0036];
X=[8 9];
figure
plot(X, Y)
title('Original')
figure
plot(X, Y)
title('Using ‘Exponent’')
Ax = gca;
Ax.YAxis.Exponent = 0;
.

댓글 수: 6

Rakesh Roshan
Rakesh Roshan 2022년 5월 9일
Thank u... This worked well if I want to control the limits of y axis like for y=[0.0032:. 001:0.0042] How to incorporate in graph
Star Strider
Star Strider 2022년 5월 9일
My pleasure!
Use the ylim function. The documentation has everything you need to understand how to use it.
Rakesh Roshan
Rakesh Roshan 2022년 5월 10일
I have gone through documentation and found ylim..command already ..but when I am using in my code i m getting an error
Dyuman Joshi
Dyuman Joshi 2022년 5월 10일
Use only the first and last value
ylim([0.0032 0.0042])
Rakesh Roshan
Rakesh Roshan 2022년 5월 11일
Thank u
Star Strider
Star Strider 2022년 5월 11일
As always, my pleasure!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

제품

릴리스

R2018a

태그

질문:

2022년 5월 9일

댓글:

2022년 5월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by