Skip to contents

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.

Usage

# S3 method for class 'ggplot'
data_context(x, ...)

Arguments

x

ggplot

...

ignored

Value

data.frame