Issue when removing scientific notation in Matlab plot

2 ビュー (過去 30 日間)
NC
NC 2016 年 5 月 4 日
コメント済み: Nikhil Sreekumar 2016 年 8 月 11 日
I am trying to configure the yticklabels to appear on the graph in a non scientific notation format. My original plot looks like:
In order to remove the scientific notation, I have tried:
set(gca,'YTickLabel',num2str(get(gca,'YTick').'))
and I get the following result:
As it can be seen here, this does not make any sense as the y axis values should increase.
I also tried the following code:
yt=get(gca,'YTick');
set(gca,'YTickLabel',sprintf('%.1f\n',yt))
and I get the following result:
As it can be seen, this does not make sense either. The top label is missing.
I cannot find the way to get it right. Any help would be appreciated.
  1 件のコメント
Nikhil Sreekumar
Nikhil Sreekumar 2016 年 8 月 11 日
Which version of MATLAB are you using and can you attach the data used?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by