Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

render_axes

Render panel axes


Description

These helpers facilitates generating theme compliant axes when building up the plot.

Usage

render_axes(x = NULL, y = NULL, coord, theme, transpose = FALSE)

Arguments

x, y

A list of ranges as available to the draw_panel method in Facet subclasses.

coord

A Coord object

theme

A theme object

transpose

Should the output be transposed?

Value

A list with the element "x" and "y" each containing axis specifications for the ranges passed in. Each axis specification is a list with a "top" and "bottom" element for x-axes and "left" and "right" element for y-axis, holding the respective axis grobs. Depending on the content of x and y some of the grobs might be zeroGrobs. If transpose=TRUE the content of the x and y elements will be transposed so e.g. all left-axes are collected in a left element as a list of grobs.


ggplot2

Create Elegant Data Visualisations Using the Grammar of Graphics

v3.3.3
MIT + file LICENSE
Authors
Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Winston Chang [aut] (<https://orcid.org/0000-0002-1576-2126>), Lionel Henry [aut], Thomas Lin Pedersen [aut, cre] (<https://orcid.org/0000-0002-5147-4711>), Kohske Takahashi [aut], Claus Wilke [aut] (<https://orcid.org/0000-0002-7470-9261>), Kara Woo [aut] (<https://orcid.org/0000-0002-5125-4188>), Hiroaki Yutani [aut] (<https://orcid.org/0000-0002-3385-7233>), Dewey Dunnington [aut] (<https://orcid.org/0000-0002-9415-4582>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.