reverse Function (GPL)
Syntax
reverse()
Description
When used in conjunction with a scale, this function reverses the scale. For categorical scales, this function can be used in conjunction with an explicit sorting function.
When used in conjunction with a polar coordinate system, this function reverses the direction of the coordinate system. Thus, it would draw pie slices in a counterclockwise direction.
Examples
SCALE: cat(dim(1), sort.natural(), reverse())
SCALE: linear(dim(2), reverse())
SCALE: linear(aesthetic(aesthetic.color.brightness), reverse())
COORD: polar.theta(reverse())