-
-
Notifications
You must be signed in to change notification settings - Fork 362
Description
A while ago we introduced a mechanism to track Observable pipelines (created by lift, map, on, and onany) and associate them with a plot so that they get garbage collected along with that plot. This is done by providing the plot as the second argument to the function, for example lift(f, plot::Plot, args...).
Most Makie recipes have already transitioned, however some still have to add this tracking. It's as simple as adding the plot (or whatever name the plot! function has it under) as the second argument to the lift or similar functions within plot!.
Specifically,
- lift(x, y, z) do x, y, x
+ lift(plot, x, y, z) do x, y, z
...
endor
- lift(some_function, x, y, z)
+ lift(some_function, plot, x, y, z)I made a PR to do this for contour in #4303, which could be a nice reference.
- contourf
- hspan/vspan
- scatterlines
- series
- timeseries
- tricontourf
- volumeslices
All the recipes can be found in https://github.com/MakieOrg/Makie.jl/tree/master/src/basic_recipes
Inspired by #4302