Skip to contents

[Experimental]

The free_gg() function allows you to incorporate a ggplot object into your layout. Unlike align_gg(), which aligns every axis value precisely, free_gg() focuses on layout integration without enforcing strict axis alignment. ggfree() is an alias for free_gg.

Usage

free_gg(..., data = waiver(), size = NULL, active = NULL)

# Default S3 method
free_gg(mapping = aes(), ..., data = waiver(), size = NULL, active = NULL)

# S3 method for class 'ggplot'
free_gg(..., data = waiver(), size = NULL, active = NULL)

Arguments

...

Additional arguments passed to fortify_data_frame().

data

A dataset used to initialize a ggplot object. By default, it will inherit from the parent layout if applicable. Alternatively, a pre-defined ggplot object can be provided directly.

size

The relative size of the plot, can be specified as a unit.

active

A active() object that defines the context settings when added to a layout.

mapping

Default list of aesthetic mappings to use for plot. If not specified, must be supplied in each layer added to the plot.

Value

A free_gg object.

Examples

ggheatmap(matrix(rnorm(56), nrow = 7)) +
    anno_top() +
    align_dendro() +
    ggfree(aes(wt, mpg), data = mtcars) +
    geom_point()
#> → heatmap built with `geom_tile()`