Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase number of tics when using a logarithmic scale in gnuplot

Tags:

gnuplot

I have created a 3D splot.

But I am not getting enough tic labels shown on x or y axis.

I tried to increase them with this:

set xtics 0.000001
set ytics 0.000001

This does increase the number of tic marks BUT not the associated labels.

screenshot of graph axis

Snippet of data (map.gnu):

0.00007430 0.00001000 155999
0.00007430 0.00001200 142552
0.00007430 0.00001440 141632
0.00007430 0.00001728 175229
0.00007430 0.00002074 198271
0.00007430 0.00002488 180482
0.00007430 0.00002986 121753
0.00007430 0.00003583 18049
0.00007430 0.00004300 46966
0.00007430 0.00005160 27892
0.00007430 0.00006192 20279
0.00007430 0.00008916 128832

0.00008916 0.00001000 126748
0.00008916 0.00001200 101393
0.00008916 0.00001440 143819
0.00008916 0.00001728 149303
0.00008916 0.00002074 190983
0.00008916 0.00002488 102433
0.00008916 0.00002986 13360
0.00008916 0.00003583 -27076
0.00008916 0.00004300 4639
0.00008916 0.00005160 5388
0.00008916 0.00006192 -33533
0.00008916 0.00007430 -146472

Script:

set terminal wxt size 1500,900
set ticslevel 0
set key off
set logscale x
set logscale y
set xlabel "x SHORT (log)"
set ylabel "y LONG (log)"
splot "map.gnu" using 1:2:3 with points palette pointsize 3 pointtype 7
like image 533
ManInMoon Avatar asked Sep 30 '22 14:09

ManInMoon


1 Answers

Your command set xtics 0.000001 would normally specify an increment of 0.000001. However when you are using logarithmic axes, the meaning of the increment changes. It becomes the multiplicative factor instead. So instead of the difference between each major tic, it is the ratio between them.

Without knowing the full range of your data it is impossible to suggest a good value for this but it should be a number greater than 1. The closer to 1 it is, the closer together your major tics will be.

Note that the unlabelled tic marks are the minor tics, which are of a higher frequency by default.

like image 143
Tom Fenech Avatar answered Oct 04 '22 19:10

Tom Fenech