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 more on layout integration without enforcing strict axis alignment. ggfree() is an alias for free_gg.

Usage

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

Arguments

...

Additional arguments passed to ggplot().

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.

Value

A free_gg object.

Examples

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