Skip to content

Tracking plot types that don't yet have all lifts linked to the plot object #4304

@asinghvi17

Description

@asinghvi17

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
...
end

or

- 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    MakieBackend independent issues (Makie core)Observablesbuggood first issueThis should come with some instructions!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions