ggplot2 (version 0.9.2.1)

aes_string: Generate aesthetic mappings from a string

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.

Usage

aes_string(...)

Arguments

...
List of name value pairs

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.

See Also

aes

Examples

Run this code
aes_string(x = "mpg", y = "wt")
aes(x = mpg, y = wt)

Run the code above in your browser using DataCamp Workspace