The coord objects

ggplot2's Cartesian coordinates systems, coord_cartesian, have been extended
to allow for flexible specification of how axes are drawn.
You've seen them above.
The following table summarises the connection between ggplot2's coord functions
and those of lemon.

ggplot2

lemon's flexible

lemon's short hand

coord_cartesian

coord_flex_cart

coord_capped_cart

coord_flip

coord_flex_flip

coord_capped_flip

coord_fixed

coord_flex_fixed

–

The short hand functions in the table's right column simply are almost identical
to those in the middle column.
If one of the side arguments are specified with a character value, the
relevant axis drawing function is used. You can however choose to use e.g.
brackets_horizontal in place.

The axis drawing functions

The functions capped_horizontal or brackets_vertical returns a function
that is called when ggplot2 prints the plot.
In this package, we use ggplot2 to build the axes, then modify in place the
return grobs.

The function is called by the coord objects when printing the plot,
and is called with the arguments

scale_details, axis, scale, position, theme

The function should then return a grob.
Some pointers to how it is used can be found in ggplot2's help pages on
ggproto (?"ggplot2-ggproto")

The arguments are as follows[tip_rds]

[tip_rds]: To get the contents of the arguments, I usually include a line
in the function's code to save them as a RDS object:
saveRDS(list(scale_details=scale_details, axis=axis, scale=scale, position=position, theme=theme), file='whatever.rds')

scale_details: Details of the scales in 'npc' units (see grid::unit).
In the example below, a secondary y-axis is used, so we find both
y.major, etc., and y.sec.major, etc.

The secondary y-axis mulitplied the values by 5.
Ticks are drawn at major coordinates, as are major grid lines.
Minor grid lines, if the theme supports them, are drawn at minor.
Observe the connection between y.label and y.major_source; it only becomes
apparent when also observing the same for the x-axis.
The x.major_source are the factor integers.

axis: Character, either "primary" or "secondary". Recall that the
function is called per axis drawn.

scale: Character, either "x" or "y".

position: Character, one of the sides, "top", "right", "bottom", or
"left".

theme: The plot's theme. This is however not in absolute terms,
e.g. so text sizes may be described in relative terms to the base size.
To resolve a usable gp (graphic parameters, see ?grid::gpar) for a grob,
use ggplot2:::element_render(theme, 'axis.text.x'), in which the
second argument would resolve to the labels of the x-axis.

Brackets

The brackets comes in two orientations:
brackets_horizontal and brackets_vertical.
If you attempt to use a vertical bracket on a horizontal axis, it will fail with
a undescriptive error.

The bracket functions accept a direction argument, which can be used to control
which direction the end-points are pointing:

The look of the brackets are controlled via theme(axis.ticks).
The length of the end-point are controlled via the theme
theme(axis.ticks.length). If these needs to be specified for each margin,
use the argument tick.length:

Scales

As of lemon v0.4.2, you can now use symmetric y- og x-axis scales.

p + scale_y_symmetric(mid=0)

The same effect could be achieved with coord_cartesian or
use of scale_y_continuous; however when used with a facet
where each row (or column) should scale to the data,
scale_x_symmetric and scale_y_symmetric ensures the data
will remain centered.