Data

The data field of a layer contains the dataset that will be used to populate the plot. There are no type restrictions on this dataset, as long as it respects the Tables interface. In particular, any one of these formats should work out of the box.

The data helper function creates an under-defined layer, where only the data field is populated..

using AlgebraOfGraphics
df = (a = rand(10), b = rand(10))
data(df)
Layer(identity, (a = [0.4785654169030863, 0.9269128798386599, 0.2445956555293881, 0.9700949700690452, 0.22369446519145963, 0.5877669003381266, 0.33414308034507767, 0.8328437322624148, 0.12908655558461324, 0.029912532620895882], b = [0.680854843512343, 0.784752618567156, 0.7804970938903399, 0.5190767170053249, 0.14564796631451615, 0.10937964297031333, 0.7920716392412764, 0.6729897446482925, 0.2911629885905048, 0.6310600087100812]), Any[], {})