GnuPlot中的对数y为零 [英] Logarithmic y with zero in GnuPlot
问题描述
我的目标是在1以下一点的对数刻度上显示0值.
My goal is to display 0 values on a logarithmic scale a little bit under 1.
我设法用对数Y刻度绘制了自己的简单直方图(with boxes
).我的Y值是不超过25000的非负整数.当Y比例尺从1开始时,我无法区分0和1值.这在数学上是正确的,但我想在1的正下方砍零.
I managed to plot my own simple histogram (with boxes
) with logarithmic Y scale. My Y values are non-negative integers up to 25000. I cannot differentiate the 0 and 1 values as the Y scale begins at 1. Which is mathematically correct, but I want to hack a zero just under the one.
如果我要编写一个绘制图形的程序,则将所有数据加1,然后从Y标签中删除1.有什么花招可以帮我吗?
If I were to write a program that plots my graph, I would add 1 to all of my data, and remove 1 from the Y labels. Is there any tricks that would do something like that for me?
推荐答案
gnuplot> set xrange [0:2]
gnuplot> set log y
gnuplot> set yrange [0.1:100]
gnuplot> set ytics ("0" 0.1, "1" 1, "10" 10)
gnuplot> plot cosh(x)
gnuplot>
这篇关于GnuPlot中的对数y为零的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!