Making the tics stick out

The following figure illustrates another tic style available in gnuplot, where the tics stick out of the plot rather than intrude on the interior of the graph:

Making the tics stick out

This style is useful when inner tic marks might obscure your plot elements, for example, when part of the curve lies close to an axis.

How to do it…

Following is the script used to obtain the previous figure:

set tics out
set grid
plot [-3:3] tanh(x)

How it works…

The new command here is the first line, which leaves everything else the same while drawing the tics so that they stick out of the borders.

Get gnuplot Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.