-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
[RFC] Plots 2.0
#4565
Comments
Probably a good idea. Being able to rip out and rework the internal part of the pipeline would help tackle some of the performance issues. Anything we could do to move to concretely typed data structures internally would likely pay dividends. And the merged dictionaries setup may need reworking, because Julia doesn't like iterating over it. I think one of those issues is mine suggesting a layout system that doesn't need handholding to fit everything in the window. |
Thanks for the comments, don't hesitate to label stuff, and adjust the list here. |
I wanted to write this issue soonish anyway, so thanks for opening. I think an important part is to define a common set of goals and non-goals we want to accomplish with this breaking release and only break things with a clear motivation. For starters I am going to list my personal goals: Towards a get-API and improving attribute management in generalI started this in #3069 #2854 and then in #4489. Don't export symbols that are not part of the APII don't think that needs explanation Change defaultsI was for a long time gatekeeper of defaults considering this a (visually) breaking change. This would be the time to have that never ending discussion about what the best default color palette would be (but in a separate issue, please). Explicit cyclingWhile cycling is useful in many cases, especially in combination with layers of recipes it causes some really hard to debug issues (thinking of JuliaPlots/GraphRecipes.jl#163 and others). I want that to be opt-in in Plots 2.0 rather than the default. Getting rid of global mutable stateThere are some low hanging fruit like the defaults and alias dictionaries, which don't have to be dictionaries. That's probably not all, but the first things that came to my head. |
|
Although I'm a bit less active these days as my grad school and julia work is over, I feel that issue is very important as we have learned a few things and annoyances of the current approach. I wanna just write off a few things that come to mind that should also be somehow considered:
Ideally, we would need to discuss and assign priorities this endless backlog of things in a maintainers call. @BeastyBlacksmith could you let us know about the next one? Maybe we should ask other great julia figures about what they think is good. There are many great julia people who wish Plots was better, and it would also be beneficial to hear what they wanna say. |
I keep #3538 (comment) up to date. I had to shift this months meeting for a week to 17th of January. |
Thanks @isentropic. Regarding 1., see #4566 (comment). Regarding the issues mentioned by @EldarAgalarov:
|
For starters I created a new orphan branch as playground to test simple implementations. |
Is it right to say that to move to 2.0, we'd need to for the most part accomplish only two things:
Other things are minor (but breaking nonetheless) and we can refine these later:
@t-bltg @BeastyBlacksmith I have some time this week or couple and could work on this. What's the best strategy for this? Open a new branch and try to accomplish those two major things (Preferences.jl and packageext?) |
I played a bit with the Preferences stuff on the sandbox branch and found that it doesn't meet our requirements like being able to change defaults at runtime. I started working on the Package Extension refactor here, but progress is slow and any help appreciated. I'm also open for having a call to walk you through the current state. |
I skimmed over the branch, man its a lot of change. Could I ask why did you opt for completely splitting the codebase into such submodules? Could you also make this fork available as a branch in the main repo, so that we can rebase and stuff easier? Are GR tests passing? Perhaps a maintainers call would be a good time |
As usual, thanks a lot for your amazing work |
That would be tomorrow ;)
Since I have to import stuff explicitly into the extension modules anyway I'd rather have to import a bunch of modules than each function individually |
Hello. I want to maybe create some reflection about not having a default backend, and the consequences for the usability and future of the Plots package. I've gathered the data of the monthly downloads of Plots and all the backend from JuliaHub, and this is what I get: Plots montlhy downloads: 35k Backends: GR: 36k I would say from that data that it is likely that Part of the issue is just about naming "rights". I don't think that the default flexibility of switching backends, which is one of the original purposes of the package, is a appealing enough feature. In fact, I think Plots has grown up to be more than that (in some point of view), which is a plotting package with a very "Julian" and nice interface, mostly more natural and better than those of any of the backends. Currently, I feel, the possibility of choosing the backend is a niche feature, that could be relegated to It concerns that not having Plots (with that name!) with the simplest possible usability will become yet another first-Julia-trial bad first experience. Having options as environment variables or Preferences to set the default backend only makes the user experience hackier. Also, we must consider that that change will break thousands of scripts people have coded and distributed, including documentation of packages, which show some plots just taking for granted that One possibility is that these scripts will migrate to just using one of the backends directly, which I think would be bad for the future of the Plots package as a whole. |
[Edit, this comment simultaneous with lmiq's just above!] After briefly trying out the 2.0 branch, I believe the way you get 1.0's default behaviour is: using Plots, GR
gr() With just Questions:
Extensions could make The functions like |
Thank you for collecting these numbers! The things I am currently trying to address with abandoning a default backend are the following:
That said it wouldn't be impossible to have the plotly backend working without additional dependencies. Like in the old days. But that comes with its own bag of Problems. I also think setting the first backend could be shorted to just |
Thanks. I perfectly understand those goals. I'm just unsure about the meaning of the last one, for the package: "I have the experience that many people don't recognize that Plots isn't a plotting library per se". I also have that experience. I would say, nevertheless, that the great majority of people arrive to Plots searching for a plotting library per se, very few people choose With this choice in 2.0 that would become explicit. But is that good? Or will it just move most people from here to just using one of the backends, decreasing the relevance of the unified interface? I, personally, have a very specific concern about this: when I teach Julia courses, it is hard enough to get students going at the start, with all the Julia idiosyncrasies, to add one additional lower-level issue to think about. I think that there I would just choose one backend and move over, with the downside that My impression is that someone searching for the abstraction layer is easily willing to use That said, I do not think I have anything else to contribute, so I'll not pollute further the thread, I'm sure the decision the team takes will be for the best. Thank you very much for your efforts. |
I can imagine reasons why this might not be desired, but have you all considered making the bulk of Plots 2.0 That way people who are used to Plots experience no disruption, they can still switch backends if they like, and the backing lightweight interface package is available for those experienced users who want to use a different backend and avoid loading GR? |
I am open to that idea |
We do the same thing as is proposed here in Makie. To be specific, loading What Makie doesThere are three "API"s to control backends. The first is each backend's This is most equivalent to the current Second, when saving a plot, the user can pass the backend and all screen configuration keyword arguments to Third, the same keyword arguments for What Plots could doGiven that Plots' default behavior is to display a plot if you naively use There could be a These were my basic thoughts after skimming this thread, hope they help! |
I understand that we should prioritize the low-barrier to entry and other things for the purposes of education and just plain-ol ease of use. Currently with v2:
This might be annoying yes, but how about we change such that
Maybe we could even add colors and something to this message. I'm proposing that the initial backend activates itself implicitly in case there are no other backends loaded yet. |
For those who are in education, I strongly think having no default backend is even better because of how brittle GR at times could be. We can recommend unicodeplots backend in the Info message above in case their GR installation wasn't successful. We understand that this a breaking change, hence this a 2.0. I strongly think that this will be good long-term. It would also be good to hear what and why you'd like to change to lower the barrier and make Plots even more usable. @fonsp We also wanna take this chance to introduce other changes like:
|
Just some additional data, on GitHUb code searches:
Results: 33.7k code entries
Results: 32.8k code entries.
Results: 1.7k entries
Results: 8.9k entries |
Too many issues need stuff discussed but postponed to
2.0
because rightfully considered breaking.Latest example at #4561, caused by a cycling bug identified more than two years ago in #2980.
Should we branch somehow and start working on
2.0
?I've closed around
~80
stale issues this we, we need to go through all the remaining opened issues, close the stale ones (or won't fix because of an upstream problem, or dependencies), apply labels to start focusing on important things (like scaling, fonts, backend selection, precompilation, consistency between backends, ...). We won't do this on our own, so please do join this attempt.Labeled issues:
minorticks
semantics #4532Project.toml
#4631Labeled PRs:
pgfplots
#4326@df
macro to Plots #3351The text was updated successfully, but these errors were encountered: