February 2012
Beginner to intermediate
220 pages
5h 8m
English
gnuplot, by default, arranges our graph with a set of ticmarks at equally spaced intervals, with gridlines to match (if we turn the grid on). If we want to make it easy to read off the values of a particular set of points, we can do better:

The following script will create the previous figure:
set term pngcairo dashed set out 'xsquared.png' set samples 6 set key top left set for [n = 1 : 4] arrow from first n, 0 to first n, n**2 back \ nohead lt 7 set for [n = 1 : 4] arrow from first 0, n**2 to first n, n**2 back \ nohead lt 7 set for [n = 0 : 5] ytics (n**2) plot [0:5] x**2 with linespoints pt 7 ps 3
Read now
Unlock full access