Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observable SpecApi objects lose their attributes – eg, in ecdfplot #4686

Open
3 tasks done
aplavin opened this issue Dec 20, 2024 · 1 comment
Open
3 tasks done
Labels

Comments

@aplavin
Copy link
Contributor

aplavin commented Dec 20, 2024

Noticed a regression in a recent version, related to observable specapi objects. Specifically, they seem to lose their attributes.
MWE:

using GLMakie
x = Observable([1,2,3])
ecdfplot(x, linewidth=10)

shows (correct)
Image
But then, updating x resets attributes to defaults:

x[] = [1,2,3]

Image

  • what version of Makie are you running? (]st -m Makie) v0.21.18
  • can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie) yes
  • What platform + GPU are you on? any
@aplavin aplavin added the bug label Dec 20, 2024
@asinghvi17
Copy link
Member

asinghvi17 commented Dec 23, 2024

Ah, it looks like this problem is actually twofold: setting ecdfplot_obj.linewidth after plotting does not change the displayed linewidth either. Maybe it's a problem with convert_arguments not catching the updated attribute from the kwargs?

Here's an interactive example in the REPL that shows what's going wrong:

julia> f, a, p = ecdfplot(x, linewidth=10)

julia> p.linewidth[]
10

julia> p.plots[1].linewidth[]
10

julia> # now, this does not work:

julia> p.linewidth[] = 15
15

julia> # but this does

julia> p.plots[1].linewidth[] = 15
15

julia> # now we can also try to change the data:

julia> x[] = rand(1:5, 3)
3-element Vector{Int64}:
 2
 3
 4

julia> p.linewidth[]
15

julia> p.plots[1].linewidth[]
1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants