0

Im plotting data which have range of x axes from 0 to 100. I want for x-axes to be devided like in pic: DESIRED PLOT

I have this gnuplot code :

reset
set terminal postscript enhanced color font "Helvetica" 12 
set output 'lambda.eps'
set xtics (0,1,10,100)

plot 'lambda.dat' u 4:6

And obtained this image

My result

How to get x axis in this scale?

4
  • Do you mean set logscale x? Commented Jan 13, 2017 at 16:55
  • @MarkSetchell I tried that but still does not work Commented Jan 13, 2017 at 17:07
  • Give us your data, maybe there sits the problem? Commented Jan 13, 2017 at 17:09
  • 2
    I would try to remove set xtics (0,1,10,100) and use set xr [0.1:100]; set logscale x instead - that xtic at zero in combination with logscale looks suspicious... Commented Jan 13, 2017 at 18:08

1 Answer 1

1

The command set logscale x will do the job.

set nokey
set title "Dynamical dominance criteria example"

set logscale x
set logscale y

set format y "10^{%T}"

plot "lambda.dat" using 1:2 lc 0 pt 12, \
     "lambda.dat" using 3:($2*3):4 with labels

For me, the command set xrange [0.1:100] was not necessary, the range was chosen automatically. This is the result:

diagram with "set logscale"

You did not provide your data, so I extracted it with g3data:

0.392  1.315e-13  0.392  Mercury
0.725  1.095e-11  0.595  Venus
0.994  9.520e-12  1.144  Earth
1.514  6.491e-14  1.514  Mars
0.994  1.216e-15  0.994  Luna
5.166  8.940e-08  5.166  Jupiter
9.543  4.136e-09  9.543  Saturn
19.24  3.286e-11  15.24  Uranus
30.35  1.843e-11  34.35  Neptune
39.48  1.946e-19  39.48  Pluto
2.797  1.183e-19  2.797  Ceres
40.18  6.960e-23  40.18  KBO
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.