Search code examples
gnuplotxmgrace

How to plot 10th power range in gnuplot or xmgrace?


I am using the following data set:

x = 10, 20, 50, 100;
y = 1.2e-5, 3.5e-8, 6.8e-14, 2.5e-20;

If I plot x:y in gnuplot or xmgrace, the y points in the plots are indistinguishable (particularly the last three ones).

Is there is any trick to customize the y axis so that smooth and distinguishable points are obtained?

Thanks.


Solution

  • A sensible thing to do here would be plotting your data using a logarithmic scale on the y axis. With gnuplot, if your data.txt is

    10 1.2e-5    
    20 3.5e-8  
    50 6.8e-14  
    100 2.5e-20
    

    You can try in the gnuplot prompt

    gnuplot> set logscale y 
    gnuplot> p [0:120][1e-25:1e-3] "data.txt"