opposite Function (GPL)

Syntax

opposite()

Description

Positions an axis on the side opposite from the one on which it normally appears. For example, using opposite with the y axis would position it on the right side. opposite can also be used to create two axes, in which case the opposite one is often an alternate scale or a transformed version of the original.

Examples

Figure 1. Example: Moving the y-axis to the opposite side
GUIDE: axis(dim(2), label("Count"), opposite())
Figure 2. Example: Adding a derived axis
GUIDE: axis(dim(2), label("Cumulative Count"))
GUIDE: axis(dim(2), label("Cumulative Percent"), opposite(), unit.percent())