JuliaCon 2025

The big refactor that made AlgebraOfGraphics "scale" better
2025-07-23 , Main Room 4

AlgebraOfGraphics (AoG) is a declarative plotting library based on an algebra of composable layers. It allows users to flexibly combine data, mappings, and visuals, utilizing Makie.jl's extensive capabilities. Its initial design, a thin layer over Makie, had limitations in versatility and user experience. Last year, PumasAI fully refactored AoG's scale system, resulting in a more powerful and robust AoG. This talk will highlight key architectural improvements and showcase the best new features.


AlgebraOfGraphics (AoG) is a powerful declarative plotting library that enables users to construct complex visualizations by composing data, mappings, and visuals. Built on the Makie.jl ecosystem, AoG has always aimed to provide an expressive and flexible approach to data visualization. However, its initial approach to scales had limitations that restricted its usability and versatility.

Over the past year, PumasAI undertook a major refactor of AoG’s internals, resulting in significant improvements in performance, usability, and feature richness. This talk will go over the most important architectural changes behind this refactor and highlight key new capabilities that make AoG more robust and intuitive than ever before.

Key improvements include:

Multi-Scale Support: A major breakthrough in this refactor is the ability to use multiple independent scales for the same aesthetic, allowing separate legends for different plot types. This enables more flexibility with layered visualizations.

Better Support for Various Plot Types: The refactor fixes long-standing issues with some plot types, such as horizontal bar plots, violin plots, and error bars. Plot types have to declare the aesthetics they use in order to provide accurate axis annotations and legends.

Enhanced Legends: It's now possible to simply add plots that don't use scales to the legend by supplying a label. Users can now fine-tune legend elements, override attributes, and apply automatic alpha forwarding to ensure visual consistency. Legends and color bars can be selectively hidden or customized with greater control. Continuous marker size scales are now displayed in legends with areas chosen for linear human perception.

Overhauled Faceting & Pagination: Scales are now consistent across paginated facet plots, preventing legend collisions that previously arose when groups were missing from individual pages. The update also enables compatibility with multiple X and Y scales per facet, enhancing flexibility in complex multi-panel plots.

Easier Data Handling: The update introduces a more intuitive approach to mapping, allowing simple column vectors to be passed directly without requiring an explicit data call. It also introduces a direct function to map external columns effortlessly and supports scalar values as a shorthand for repeated categorical labels.

Improved Sorting & Missing Support: Sorting behavior for categorical and string-based data has been refined, including natural sorting of string categories and better handling of numerical vectors with missing values.

By addressing longstanding pain points and introducing powerful new features, this refactor makes AoG more flexible and user-friendly than ever before. Whether you are creating exploratory plots or publication-quality visualizations, this talk will showcase how these changes improve your AoG experience.

Senior Product Engineer at Pumas AI
Co-author and co-maintainer of Makie.jl
Creator of packages like Chain.jl, DataFrameMacros.jl and ReadableRegex.jl

This speaker also appears in: