JuliaCon 2025

Lightweight composable plotting: MakieExtra's FPlot
2025-07-23 , Main Room 2

Traditional plotting functions like scatter(x, y, color=c) separate x, y, and c, losing the fact that they describe properties of the same elements. MakieExtra.jl’s FPlot promotes a dataset-centric approach, linking arbitrary element features to plot attributes. This method simplifies and enriches interactivity, enables automatic labeling, and enhances composability, as demonstrated in the talk.


Most plotting libraries, such as Makie, typically handle plot properties (like coordinates, color, size) as separate arrays. This simplicity works well for basic plots, epitomized by scatter(x, y). However, for more complex applications, this can be limiting. Frequently, you'll have a dataset — a collection of some elements — and conceptualize plotting in terms of these elements: "for each r ∈ data, plot abs(r.value) on the x-axis, angle(r.value) on the y-axis, and use r.age for color."

Makie partially supports this with spatial coordinates using a Vector of Points, but still requires other attributes like color to be passed separately. Moreover, even with just coordinates, providing more information about the dataset than raw points can facilitate richer interactivity and automatic plot labeling.

The FPlot object encapsulates the complete plot definition, including the dataset and functions that map features to plot attributes. This design streamlines exploratory plots, simplifies and enriches interactivity, and encourages further composability in recipes. I'll demonstrate these advantages and discuss existing limitations and potential future improvements, inviting feedback for further development.