-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
map dependency tree of Plots' attributes #1149
Comments
I could do this by pen and paper by looking over the code, but I guess some of the hackers in this organisation could find a way to lift it from the code? |
It's a nice idea! I was thinking along these lines as well after the slack chat with @SimonDanisch. I have two questions regarding future plans and one remark: Question 1: Do we also intend to support changing an attribute that only affects one series? i.e. should it, for example, be allowed to change the line color of the 3rd series? As of now, I don't think that's possible and I wonder whether it should be or if it's just bad practice to build a plot like that. Question 2: Do we want to distinguish, when updating the attributes, whether one attribute was computed automatically or given by the user? For example, if I give explicit Remark: As of know, solving this issue would still not allow a fully efficient update of the plot, as the backends only implement one monolithic display function that computes everything. For this proposal to work, the backend code would need to be much more modular, which I think should be taken care of during the Plots.jl reorganization, I'll try to post a more lengthy discussion of this tomorrow in the Plots reorg issue. |
I see, but also on Question 1 we need to be careful, as here there is the opposite problem: now we don't update any attribute, so for example:
doesn't do anything, as the |
Exactly, that's the purpose of mapping the dependency tree :-) |
Question 2:
That's my intuition as well. Actually i have it implemented in GLVisualize like this forever. It also has some other advantages:
This relies a bit on the assumption, that it's easy for users to build those links themselves - which should be true :) Remark: couldn't agree more! |
Many attributes in
Plot
objects depend on each other:x
affectsaxis[:extrema]
,background_color
affectsforeground_color
affects most other colors, etc. It would be nice to map these depedencies (also to put in the docs). In particular, it would make for much faster updating ofPlot
objects, where you'd push a change, say a new series (e.g. by callingplot!
) or a different background color, and then the rest of the plot would update accordingly, but only updating those attributes that were affected by the change. This is inspired by @SimonDanisch 's ideas in Makie but @tbreloff also talked about this idea a number of times in the past.The text was updated successfully, but these errors were encountered: