Increase precision of plot axes
18 次查看(过去 30 天)
显示 更早的评论
I have some large time values, seconds to minutes of time expressed in nanoseconds-so at least 9 digits. When I plot some value v. time, the x axis is automatically switched a smaller number and a power. I might have 1.455 1.455 1.455 x10^8 instead of 145500000, 145500001, 145500002. How can I make it display the whole number without a power?
Secondly, since they will take up more room, is there a way to angle them at the tick marks?
0 个评论
采纳的回答
Walter Roberson
2013-3-13
set the axis xticklabel to a cell array of strings that are the displays you want.
3 个评论
Azzi Abdelmalek
2013-3-13
It's better if you determine your ticks
nticks=5; % number of ticks
ticks=linspace(min(x),max(x),nticks)
Walter Roberson
2013-3-13
curticks = get(gca, 'XTick');
set( gca, 'XTickLabel', cellstr( num2str(curticks(:), '%d') ) );
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!