8.8.5 Configuring the appearance of axes

The set axis command also accepts the following keywords alongside the positional keywords listed above, which specify how the axis should appear:

  • arrow – Specifies that an arrowhead should be drawn on the right/top end of the axis. [Not default].

  • atzero – Specifies that rather than being placed along an edge of the plot, the axis should mark the lines where the perpendicular axes x1, y1 and/or z1 are zero. [Not default].

  • automirrored – Specifies that an automatic decision should be made between the behaviour of mirrored and nomirrored. If there are no axes on the opposite side of the graph, a mirror axis is produced. If there are already axes on the opposite side of the graph, no mirror axis is produced. [Default].

  • fullmirrored – Similar to mirrored. Specifies that this axis should have a corresponding twin placed on the opposite side of the graph with mirroring ticks and labelling. [Not default; see automirrored].

  • invisible – Specifies that the axis should not be drawn; data can still be plotted against it, but the axis is unseen. See Example 8.11.2 for a plot where all of the axes are invisible.

  • linked – Specifies that the axis should be linked to another axis; see Section 8.8.9.

  • mirrored – Specifies that this axis should have a corresponding twin placed on the opposite side of the graph with mirroring ticks but with no labels on the ticks. [Not default; see automirrored].

  • noarrow – Specifies that no arrowheads should be drawn on the ends of the axis. [Default].

  • nomirrored – Specifies that this axis should not have any corresponding twins. [Not default; see automirrored].

  • notatzero – Opposite of atzero; the axis should be placed along an edge of the plot. [Default].

  • notlinked – Specifies that the axis should no longer be linked to any other; see Section 8.8.9. [Default].

  • reversearrow – Specifies that an arrowhead should be drawn on the left/bottom end of the axis. [Not default].

  • twowayarrow – Specifies that arrowheads should be drawn on both ends of the axis. [Not default].

  • visible – Specifies that the axis should be displayed; opposite of invisible. [Default].

The following simple examples demonstrate the use of some of these configuration options:

set axis x atzero twoway
set axis y atzero twoway
plot [-2:8][-10:10]

\includegraphics[width=8cm]{examples/eps/ex_axisatzero}

set axis x atzero arrow
set axis y atzero twoway
plot [0:10][-10:10]

\includegraphics[width=8cm]{examples/eps/ex_axisatzero2}

set axis x notatzero arrow nomirror
set axis y notatzero arrow nomirror
plot [0:10][0:20]

\includegraphics[width=8cm]{examples/eps/ex_axisatzero3}