Generate aesthetic mappings from a string

Usage

aes_string(...)

Arguments

...
List of name value pairs

Description

Aesthetic mappings describe how variables in the data are mapped to visual properties (aesthetics) of geoms. Compared to aes this function operates on strings rather than expressions.

Details

aes_string is particularly useful when writing functions that create plots because you can use strings to define the aesthetic mappings, rather than having to mess around with expressions.

Examples

aes_string(x = "mpg", y = "wt")
List of 2 $ x:length 1 mpg ..- attr(*, "id")= int 31 $ y:length 1 wt ..- attr(*, "id")= int 25
aes(x = mpg, y = wt)
List of 2 $ x:length 1 mpg ..- attr(*, "id")= int 31 $ y:length 1 wt ..- attr(*, "id")= int 25

See also

aes