如何处理特殊格式标签的y = 0 tic [英] How to deal with y=0 tic for special formatted label
本文介绍了如何处理特殊格式标签的y = 0 tic的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我有一个像这样的脚本
Suppose I have a script like this
set terminal png enhanced
set output "test.png"
set ytics format "%.1t 10^{%S}"
set ytics 5000
set mytics 5
set xrange [0:16000]
plot x
产生以下内容.
我同时拥有主要抽动和次要抽动.但是,tic值为零时看起来很丑,所以我想对其进行修改或删除.
I do wnat major tics as well as minor tics. However, the tic at zero looks ugly, so I would like to modify or delete it.
我尝试了set ytics (5000,10000,15000)
.这是可能的,但随后我松散了次要抽动.另外,我不想手动放置抽动.
I tried set ytics (5000,10000,15000)
. This is possible, but then I loose the minor tics. Also, I don't want to put the tics manually.
因此,解决该问题的方法
So a solution to this problem would
- 删除
y=0
tic或 - 修改
set ytics format
或 - 为手动主要抽动添加了次要抽动,但是根据手册,这是不可能的.
- remove the
y=0
tic or - modify the
set ytics format
or - adds minor tics for manual major tics, but according to the manual this is not possible.
我当然没想到的另一个解决方案也很感激!
An other solution that I didn't think of is of course also appreciated!
推荐答案
您可以使用set ytics ('0' 0)
覆盖0
tic:
You can just overwrite the 0
tic with set ytics ('0' 0)
:
set ytics format "%.1t 10^{%S}"
set ytics 5000
set ytics add ('0' 0)
set mytics 5
set xrange [0:16000]
plot x
另请参见排除科学格式的tic号.
这篇关于如何处理特殊格式标签的y = 0 tic的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文