ggfree | R Documentation |
The ggfree()
function allows you to incorporate a ggplot object into your
layout. Unlike ggalign()
, which aligns every axis value precisely,
ggfree()
focuses on integrating plots into the layout without enforcing
strict axis alignment.
ggfree(data = waiver(), ..., size = NULL, active = NULL)
## Default S3 method:
ggfree(data = waiver(), mapping = aes(), ..., size = NULL, active = NULL)
data |
The following options can be used:
|
... |
<dyn-dots> Additional arguments passed to
|
size |
The relative size of the plot, can be specified as a
|
active |
A |
mapping |
Default list of aesthetic mappings to use for plot. If not specified, must be supplied in each layer added to the plot. |
ggalign
initializes a ggplot object. The underlying data is created using
fortify_data_frame()
. Please refer to this method for more details.
When used in quad_layout()
/ggheatmap()
, if the data is inherited from the
quad_layout()
and the other direction aligns discrete variables, following
columns will be added:
.extra_panel
: Provides the panel information for the column (left or
right annotation) or row (top or bottom annotation).
.extra_index
: The index information for the column (left or right
annotation) or row (top or bottom annotation).
ggheatmap(matrix(rnorm(56), nrow = 7)) +
anno_top() +
align_dendro() +
ggfree(mtcars, aes(wt, mpg)) +
geom_point()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.