•plot — Plots

X •plot Y returns a plot spec: a keyed vector holding the data Y and the settings X. Its renderer displays the spec as an SVG chart. Plain text on the left is shorthand for the mark setting. Plots shows each mark and setting with examples.

The series and axes depend on the structure of Y:

SettingHoldsDefault
mark"line", "point", "bar" or "cell""line"
titleChart titlenone
width, heightSize in pixels600, 400
x, ytitle, scale ("linear" or "log"), ticks, and axis ($f hides that axis)
legendposition ("end" or a corner) and bordernone
grid$f hides the grid lines$t, or $f for cells
axes$f hides both axes, with their ticks and titles. An axis setting in x or y overrides it for that axis$t
flip$t swaps the axes$f
paletteColours for numbers: "viridis", "gray", or a list of colours"viridis"
colorbar$t shows the colour scale beside the plot$f
color, size, labelsStyles for every series
seriesStyles for one series, keyed by its name
widths, heights, shareFigure cell sizes and shared axis ranges

color also takes one number per point. palette turns these numbers into colours, over the range of every series in the plot. A cell is coloured by its value unless color is set.

A direct •mime call on a spec reports these errors: DOMAIN for unknown settings or values, and for cells mixed with other marks; LENGTH when series, colours, sizes or labels don't match the x values; RANK for data that isn't a vector, matrix or table.