Skip to content

Get Plot Components

get_coordinate_system()
Which coordinate system does a plot use?
get_data()
Get the data set used by a plot or layer
get_default_labels()
What is the default label for a plot aesthetic?
get_default_params()
What are the default parameters for a plot layer?
get_geom_layer()
Isolate a geom layer from a plot
get_geoms()
List the geoms used by a plot
get_geoms_stats()
List the geom and stat combination used by all layers of a plot.
get_labels()
List the labels used by a plot
get_mappings()
Get aesthetic mappings from a layer or plot
get_stat_layer()
Isolate a stat layer from a plot
get_stats()
List the stats used by a plot

Locate Components by Layer

n_layers()
How many layers are in a plot?
ith_data()
Which data set does the ith layer use?
ith_data_is()
Does the ith layer use the correct data set?
ith_geom()
Which geom is used in the ith layer?
ith_geom_is()
Is the ith geom what it should be?
ith_geom_stat()
Which geom/stat combination is used in the ith layer?
ith_mappings()
Return the aesthetic mappings used by the ith layer
ith_mappings_use()
Does the ith layer use one or more aesthetic mappings?
ith_stat()
Which stat is used in the ith layer?
ith_stat_is()
Is the ith stat what it should be?

Test that a Plot Uses a Component

identical_aes()
Are aesthetic mapping specifications "identical"?
uses_aesthetics()
Does a plot use one or more aesthetics?
uses_coordinate_system()
Does a plot use the correct coordinate system?
uses_data()
Does a plot or layer use the correct data set?
uses_extra_mappings()
Does the plot uses extra aesthetic mappings?
uses_geom_params() uses_geom_param()
Does a layer use one of more specific parameters?
uses_geoms()
Does a plot use one or more geoms?
uses_labels()
Does a plot use one or more labels?
uses_mappings()
Does a plot or layer use one or more mappings?
uses_stat_param()
Does a layer use a specific stat parameter?
uses_stats()
Does a plot use one or more stats?

Miscellaneous Helper Functions

is_ggplot() stop_if_not_ggplot() fail_if_not_ggplot()
Check if an object is a ggplot
get_default_labels()
What is the default label for a plot aesthetic?
get_default_params()
What are the default parameters for a plot layer?
default_label() default_param()
Placeholders for default values