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 |
|---|
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 = "https://www.cxplot.com/assets/data/mpg.csv";
var cxp = new cxplot("canvasId", df, aes("displ", "hwy"));
cxp.geom_point();
var df = "https://www.cxplot.com/assets/data/mpg.csv";
var cxp = new cxplot("canvasId", df, aes({y : "displ", x : "hwy"}));
cxp.geom_point();