Reputation: 1815
I've been going crazy looking for an answer to this question. How can I set the distance between the tics on gnuplot? Currently the tics in my plot are squished together too tightly. I want them to be more spread out.
Here is an example:
I have a graph that looks like this:
100 ——
|
|
50 ——
|
|
0 ——
I want it to look like this:
50 ——
|
|
|
|
|
0 ——
Notice that there is actually one less tic in the after sample.
Upvotes: 4
Views: 19250
Reputation: 65
As suggested in another answer by andyras (Change actual space between tics in gnu plot) you can do it by controlling the size of your terminal. I also had a problem, where I wanted the tics in the axis to have the same distance in absolute values (though I don't know the value itselft, but the grid should be quadratic in the end).
So if you want a quadratic grid/spacing of your tics, put
set terminal pdfcairo size 100, 100
For rectangular put
set terminal pdfcairo 100, 200
and so on. Again, this is an answer suggested by andyras, not me. I took his answer, which worked for my case.
Upvotes: 3
Reputation: 507
The distance between tics is set by set xtics
or set ytics
command. For example if I use the command plot sin(x)
then the space between the xtics
is 5 by default. The command
set xtics -10,2,10
replot
makes the xtics
appear at an interval of 2. In the above command the format is
set xtics <start>, <increment>, <end>
See help xtics
inside gnuplot
for details.
Hope this helps!
Upvotes: 8