Learn R Programming

ggedit (version 0.4.1)

layersList: layersList

Description

Runs the ggplot_build function on the input and converts the output data objects into a nested list with the unique values of each of the aesthetic columns.

Usage

layersList(obj)

Value

list of aesthetics and their values for each layer in a plot

Arguments

obj

ggplot2 plot object or list of plot objects

Examples

Run this code
p=ggplot2::ggplot(iris,ggplot2::aes(x=Sepal.Length,y=Sepal.Width))
p=p+ggplot2::geom_point(ggplot2::aes(colour=Species))+ggplot2::geom_line()
p
p.list=layersList(p)
p.list

Run the code above in your browser using DataLab