8.27.4 axis

set axis <axis>, ...

The command:

set axis x2

may be used to add a second $x$-axis to a plot, with default settings. In general, there is no practical reason to use this command, as a second $x$-axis would implicitly be created by any of the following statements:

set x2label 'foo' \\
set x2ticdir outwards \\
plot sin(x) axes x2y1

Of more practical use is the unset x2 command, which is used to remove an axis once it has been added to a plot. After executing:

set x2label 'foo'

for example, the only way to tell PyXPlot to subsequently produce a plot without a second $x$-axis would be to delete this axis with the following command:

unset axis x2

Note that in this case, the unset x2label command would be sufficient to remove the label ‘foo’ placed on the new axis, but not sufficient to delete the new axis that the set x2label command implicitly created. Multiple axes can be deleted in a single unset axis statement, for example:

unset axis x2x4x5

In the special cases of unset axis x1 or unset axis y1, these axes cannot be deleted; a plot must have at least one $x$- and one $y$-axis. Instead, the unset axis command restores these axes to their default configurations, removing any set titles or ranges that they might have been given.