抑制图形刻度中的指数格式 [英] Suppress exponential formatting in figure ticks

查看:85
本文介绍了抑制图形刻度中的指数格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大于10'000的刻度的刻度标签,例如,格式设置为1x10 ^ 4.而指数部分出现在相应轴的上方.在Matlab Central上的 上也对此行为进行了很好的描述,但没有解决方案.

Tick labels for ticks bigger than about 10'000, get formatted to 1x10^4 for example. Whereas the exponential part appears above the corresponding axes. This misbehavior has been well described on on matlab central as well, but without a solution.

感谢您的帮助.

快速技巧"

set(gca, 'YTickLabel',get(gca,'YTick'))

应用于bar3时不起作用,如下图所示.

did not work when applied to bar3, as can be seen on the following figure.

推荐答案

一种更好地控制刻度标签并避免指数格式的方法是使用

One way to get better control over tick labels, and to avoid the exponential formatting, is to use TICK2TEXT from the File Exchange.

这是一个例子:

y = cool(7); %# define some data
ah = axes; %# create new axes and remember handle
bar3(ah,y*1E6,'detached'); %# create a 3D bar plot
tick2text(ah, 'ztickoffset' ,-1.15,'zformat', '%5.0f', 'axis','z') %# fix the tick labels

这篇关于抑制图形刻度中的指数格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆