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 x 10 #> panel row col vars xmin xmax ymin ymax xscale yscale #> <fct> <int> <int> <list> <dbl> <dbl> <dbl> <dbl> <list> <list> #> 1 1 1 1 <list [1]> 1.33 7.27 10.4 45.6 <S3: ScaleC… <S3: Scale… #> 2 2 1 2 <list [1]> 1.33 7.27 10.4 45.6 <S3: ScaleC… <S3: Scale… #> 3 3 1 3 <list [1]> 1.33 7.27 10.4 45.6 <S3: ScaleC… <S3: Scale… #> 4 4 2 1 <list [1]> 1.33 7.27 10.4 45.6 <S3: ScaleC… <S3: Scale… #> 5 5 2 2 <list [1]> 1.33 7.27 10.4 45.6 <S3: ScaleC… <S3: Scale… #> 6 6 2 3 <list [1]> 1.33 7.27 10.4 45.6 <S3: ScaleC… <S3: Scale… #> 7 7 3 1 <list [1]> 1.33 7.27 10.4 45.6 <S3: ScaleC… <S3: Scale…
summarise_coord(b)
#> $xlog #> [1] NA #> #> $ylog #> [1] NA #> #> $flip #> [1] FALSE #>
summarise_layers(b)
#> # A tibble: 1 x 1 #> mapping #> <list> #> 1 <list [2]>