gnuplot如何降低X轴上的抽动数量 [英] Gnuplot how to lower the number of tics in x axis

查看:102
本文介绍了gnuplot如何降低X轴上的抽动数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

该人物的xtics和ytics过多.我可以吃一半吗?

The figure has too many xtics and ytics. Can I have half of them?

我知道我可以通过类似以下方式手动设置tic:

I know I can manually set tics in a way similar to this:

set xtics (1,2,4,8,16,32,64,128,256,512,1024)

但是我觉得这不是一个普遍的解决方案.您不能为所有图形手动设置tic.我有很多负载,并且gnuplot代码是使用Java自动生成的.

But I feel it is not a general solution. You can not manually set tics for all figures. I have loads of them and the gnuplot code is automatically generated using Java.

以下是该图的代码: https://dl.dropboxusercontent.com/u/45318932/gnuplot2.plt

您能帮助降低x和y抽动的数量吗?

Can you help lower down the number of x and y tics?

推荐答案

在gnuplot中,没有任何选项可以显式设置轴上所需的抽芯数量,并由gnuplot决定将它们放置在哪里. (我真的希望有.)

There is no option in gnuplot to explicitly set the number of tics you want on an axis and have gnuplot decide where to put them. (I really wish there were.)

您拥有的一种选择是使用stats命令(在gnuplot 4.6+中)来查找数据范围:

One option you have is to use the stats command (in gnuplot 4.6+) to find out the range of the data:

ntics = 4

stats 'data.dat' using 1 name 'x' nooutput
stats 'data.dat' using 2 name 'y' nooutput
stats 'data.dat' using 3 name 'z' nooutput

set xtics x_max/ntics
set ytics y_max/ntics
set ztics z_max/ntics

您可能需要调整是否希望tic处于整数值,但这是通常的想法.

You might have to adjust whether you want the tics to be at integer values or not, but that is the general idea.

这篇关于gnuplot如何降低X轴上的抽动数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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