I noticed I didn’t make posts for the last two versions either, so I’m going to catch up a bit here. If you have tried AoG more than a year ago and found it lacking for your needs, maybe now’s a good time to have another look at it.
I’m just going backwards in time, picking some more salient changes along the changelog
v0.10 adds the ability to have multiple colorbars for the same figure, and the ability to represent categorical color scales with colorbars as well, which is by default used for the Bin
scale that filled_contours
produces:
The wrapped
palette function gives more control over the shape that layout
produces:
There’s now support for units via Unitful.jl or DynamicQuantities.jl:
Histograms can be easily drawn in stair form
The mergeable
function was refactored so that SwarmMakie can correctly draw swarm plots with AoG
Pagination was refactored such that all scales are resolved before pagination. Therefore colors are now consistent across pages, note how the two pages here share the same legend even though not every category exists on each page:
Multiple X and Y scales can now be used within one plot, as long as no facet uses more than one of each
Plots can simply be labelled without having a scale, by adding visual(label = ...)
:
Figure options allow easy setting of title, subtitle and footnotes without needing to use Makie layouting directly:
The generic dodge_x
and dodge_y
mappings allow dodging all plot types by modifying their input data, this allows for the common “barplot + errorbar” scenario, for example:
The from_continuous
helper makes it easier to use continuous colormaps for categorical plots:
using AlgebraOfGraphics
using CairoMakie
spec = data((; x = 1:10, y = 1:10, z = 'A':'J')) *
mapping(:x, :y, color = :z) *
visual(BarPlot)
f = Figure()
fg1 = draw!(f[1, 1], spec, scales(Color = (; palette = :viridis)))
legend!(f[1, 2], fg1)
fg2 = draw!(f[1, 3], spec, scales(Color = (; palette = from_continuous(:viridis))))
legend!(f[1, 4], fg2)
f
Strings are sorted in natural sort order, so a 10 comes after a 9 if it appears in a string, not like here, where the 10 comes between 1 and 2
And, finally, all the way back since v0.8, missing
s do not cause data to be interpreted as categorical anymore. Instead, they are converted to NaN in the plotting primitives, like Makie does it.
That’s all for now, happy plotting!