Different step calculation for Y axis labels in Gnuplot

I am trying to create barchart using gnuplot. My requirement is that I can designate the y axis as 0, 1, 100, 10000 (i.e., each tick increases 100 times, except from 1 to 0). Also, this is not a log scale, as I want it to start at 0. Let me know if you know how to do this.

+3
source share
2 answers

You can use set xtics:

gnuplot> set xtics ("0" 1, "1" 2, "100" 3, "10000" 4)
gnuplot> plot "test.dat" notitle with boxes

displays the following graph:

http://marco.uctleg.net/resources/sample_xtics.png

with the following data:

1 12
2 8
3 19
4 42

EDIT: Just noticed that you asked to change the y axis. This is almost the same, I'm sure you can solve it.

+2
source

Marcog , , , ,

, 1 "0", 2 "1" ..

set ytics (0,1,100,10000)

, , y .

set format y "10^{%L}"

( , , gnuplot ).

. http://t16web.lanl.gov/Kawano/gnuplot/tics-e.html set format ( ).

0

Source: https://habr.com/ru/post/1782400/


All Articles