1

My plot has logx axis. So I want to show the tic marks. But due to the size of the tic values they overlap. For example: enter image description here

But if I reduce the tic marks by the command

set xtics (1.0e-7,1.0e-5, 5.0e-4);

It becomes like enter image description here

I want those logarithmic tics(like the first picture) but only three values written(like the second picture) without compromising the size. Is it possible?

Sahil
  • 256
  • 1
  • 7

1 Answers1

1

As I understand you basically want keep all the auto tics and grid lines, but remove 1e-6 and 1e-4 tic labels and add a 5e-4 tic label.

You could do it the following way. Check help xtics and help format specifiers.

Code:

### set custom tics
reset session

set xrang[1e-7:5e-4]
set logscale x
set grid x,y
set format x "%.0t x 10^{%T}"
set rmargin 5

set xtics add ('' 1e-6, '' 1e-4, 5e-4)
plot x
### end of code

Result:

enter image description here

theozh
  • 22,244
  • 5
  • 28
  • 72