Generate aesthetic mappings that describe how variables in the data are mapped to visual properties (aesthetics) of geoms.


aes(x, y, ...)


x value
y value
List of name value pairs giving aesthetics to map.


aes creates a list of unevaluated expressions. This function also performs partial name matching, converts color to colour, and old style R names to ggplot names (eg. pch to shape, cex to size)


aes(x = mpg, y = wt)
List of 2 $ x:length 1 mpg ..- attr(*, "id")= int 10 $ y:length 1 wt ..- attr(*, "id")= int 20
aes(x = mpg ^ 2, y = wt / cyl)
List of 2 $ x: language mpg^2 $ y: language wt/cyl

See also

aes_string for passing quoted variable names. aes_colour_fill_alpha, aes_group_order, aes_linetype_size_shape and aes_position for more specific examples with different aesthetics.