These functions provide summarised information about built ggplot objects.

summarise_layout(p)

summarise_coord(p)

summarise_layers(p)

Arguments

p

A ggplot_built object.

Examples

p <- ggplot(mpg, aes(displ, hwy)) + geom_point() + facet_wrap(~class) b <- ggplot_build(p) summarise_layout(b)
#> # A tibble: 7 × 10 #> panel row col vars xmin xmax ymin ymax #> <fctr> <int> <int> <list> <dbl> <dbl> <dbl> <dbl> #> 1 1 1 1 <list [1]> 1.33 7.27 10.4 45.6 #> 2 2 1 2 <list [1]> 1.33 7.27 10.4 45.6 #> 3 3 1 3 <list [1]> 1.33 7.27 10.4 45.6 #> 4 4 2 1 <list [1]> 1.33 7.27 10.4 45.6 #> 5 5 2 2 <list [1]> 1.33 7.27 10.4 45.6 #> 6 6 2 3 <list [1]> 1.33 7.27 10.4 45.6 #> 7 7 3 1 <list [1]> 1.33 7.27 10.4 45.6 #> # ... with 2 more variables: xscale <list>, yscale <list>
summarise_coord(b)
#> $xlog #> [1] NA #> #> $ylog #> [1] NA #> #> $flip #> [1] FALSE #>
summarise_layers(b)
#> # A tibble: 1 × 1 #> mapping #> <list> #> 1 <list [2]>