-
-
Notifications
You must be signed in to change notification settings - Fork 360
Open
Labels
Description
MWE:
- recipe definition
@recipe MyLines (positions,) begin
Makie.documented_attributes(Lines)...
end
function Makie.plot!(p::MyLines)
att = Makie.shared_attributes(p, Lines)
lines!(p, att, p.positions; color=(:red, 0.02), linewidth=@lift $(att.linewidth) + 100)
lines!(p, att, p.positions)
return p
end- usage:
mylines(rand(100)) - result:
The problem is, att.linewidth gets modified after the first call to lines!, even though it's clearly not intended.
Even weirder, the problem goes away if attributes(p) is used instead of Makie.shared_attributes(p, Lines).
@SimonDanisch confirmed reproduction on slack; I don't if the issue is with computegraph/observables, or with shared_attributes.
- what version of Makie are you running? (
]st -m Makie) 0.24 - can you reproduce the bug with a fresh environment ? (
]activate --temp; add Makie) yes - What platform + GPU are you on? any
- Which backend are you using? (GLMakie, CairoMakie, WGLMakie, RPRMakie) any
- Please provide an minimal example of the failing code. If the problem is with the visualization, please provide a picture or video of it.