Aesthetic mappings describe how variables in the data are mapped to visual properties (aesthetics) of geoms. Aesthetic mappings can be set in cxplot() and in individual layers.

aes(x, y)


x, y, ...

List of name-value pairs in the form aesthetic = variable describing which variables in the layer data should be mapped to which aesthetics used by the paired geom/stat. The names for x and y aesthetics are typically omitted because they are so common; all other aesthetics must be named.


A list with a class. Components of the list are either colimns of the data or constants.


Arguments can be an array of an object with properties


aes(x = mpg, y = wt)
//> Aesthetic mapping: 
//> * `x` -> `mpg`
//> * `y` -> `wt`

aes(mpg, wt)
//> Aesthetic mapping: 
//> * `x` -> `mpg`
//> * `y` -> `wt`

// aes() is passed to either cxplot() or specific layer. Aesthetics supplied
// to cxplot() are used as defaults for every layer.

var df = "";
var cxp = new cxplot("canvasId", df, aes("displ", "hwy"));
var df = ""; var cxp = new cxplot("canvasId", df, aes({y : "displ", x : "hwy"})); cxp.geom_point();