Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spacing between tics in Gnuplot

Tags:

gnuplot

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.

like image 416
K G Avatar asked Sep 06 '25 03:09

K G


1 Answers

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!

like image 176
Madhurjya Avatar answered Sep 08 '25 10:09

Madhurjya