8.8.1 Adding additional axes

By default, plots have only one horizontal x-axis and one vertical y-axis. Additional axes may be added parallel to these and are referred to as, for example, the x2 axis, the x3 axis, and so forth up to a maximum of x127. In keeping with this nomenclature, the first axis in each direction can be referred to interchangeably as, for example, x or x1, or as y or y1. Further axes are automatically generated when statements such as the following are issued:

set x2label 'A second horizontal axis'

Such axes may alternatively be created explicitly using the set axis command, as in the example

set axis x3

or removed explicitly using the unset axis command, as in the example

unset axis x3

In either case, multiple axes can be created or removed in a single statement, as in the examples

unset axis x3x5x6 y2
set axis x2y2

The first axes x1 and y1 – and z1 on three-dimensional plots – are unique in that they cannot be removed; all plots must have at least one axis in each perpendicular direction. Thus, the command unset axis x1 does not remove this first axis, but merely returns it to its default configuration. It should be noted that if the following two commands are typed in succession, the second may not entirely negate the first:

set x3label 'foo'
unset x3label

If an x3-axis did not previously exist, then the first will have implicitly created one. This would need to be removed with the unset axis x3 command if it was not desired.