| data_context.ggplot | R Documentation |
Retrieves data context of ggplot as 'data.frame'.
calls mapframe.ggplot,
and limits this to rows where 'data' is not NA
and 'aesthetic' is not duplicated.
I.e., for each aesthetic, this function
returns the first mapping that has (at least default)
data. Such mappings should be what ggplot uses
to train the corresponding scales.
## S3 method for class 'ggplot'
data_context(x, ...)
x |
ggplot |
... |
ignored |
data.frame
Other decorated_ggplot:
data_context(),
ggplot.decorated(),
ggplot_build.decorated_ggplot(),
mapframe(),
mapframe.default(),
mapframe.ggplot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.