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 ggplot
data_context(x, ...)data.frame
ggplot
ignored
Other decorated_ggplot:
data_context(),
ggplot.decorated(),
ggplot_build.decorated_ggplot(),
mapframe(),
mapframe.default(),
mapframe.ggplot()