排除科学格式的抽号 [英] excluding a tic number in scientific format

查看:47
本文介绍了排除科学格式的抽号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用set format x '%.0e'来以科学格式显示x轴编号.问题是0显示为0E+00.如何排除科学格式的0?

I am using set format x '%.0e' to have x-axis numbers in scientific format. Problem is, the 0 is shown as 0E+00. How can I exclude 0 in scientific format?

其他数字的指数也有两位数字.我想要的不是2E+01,而是2E+1.

Also other number has two digits in their exponential. Instead of 2E+01 I want 2E+1.

推荐答案

要对y轴使用其他格式,请使用%t(以10为底的尾数)和%T(以10为底的幂) .请参阅格式说明符"的文档(或键入help format_specifiers).

To use a different format for the y-axis, use %t (mantissa to base 10) and %T (power to base 10). See the documentation of the 'format specifiers' (or type help format_specifiers).

要更改单个条目,可以使用set ytics add并使用相同的数值来覆盖自动条目:

To change a single entry, you can overwrite the automatic one using set ytics add and using the very same numeric value:

set yrange[0:100]
set xrange[0:100]
set format y '%.0tE%+T'
set ytics add ('0' 0)

plot x

结果(含4.6.4):

Result (with 4.6.4):

这篇关于排除科学格式的抽号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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