Home Ask Login Register

Developers Planet

Your answer is one click away!

mee mee February 2016

How to label "xtics" at every second points?

Hi I am plotting a graph with Gnuplot and using below command.

set xrange [0:20]
set xtics 0,0.5

The graph and scale are correct as I wanted. But I would like to label only integer points (e.g. 0,1,2,3,4...,20) but I still want to keep tics at every 0.5 interval.

enter image description here

How can I command for that? thanks


Christoph February 2016

Minor tics are set with set mxtics:

set xrange [0:20]
set xtics 0,1
set mxtics 2

This plots a single minor tic between two labelled major tics.

If minor and major tics should have the same size use

set xtics scale 1,1

Post Status

Asked in February 2016
Viewed 3,009 times
Voted 11
Answered 1 times


Leave an answer

Quote of the day: live life