The function visual can be used to give data-independent visual information about the plot (plotting function or attributes).

The available plotting functions are documented here. Refer to plotting functions using upper CamelCase for visual's first argument (e.g. visual(Scatter), visual(BarPlot)). See the documentation of each plotting function to discover the available attributes.

# Examples

using AlgebraOfGraphics, CairoMakie

df = (x=randn(1000), y=randn(1000))
plt = data(df) * mapping(:x, :y) * AlgebraOfGraphics.density(npoints=50)
draw(plt * visual(Heatmap)) # plot as heatmap (the default)
draw(plt * visual(colormap=:viridis)) # set a different colormap