-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Tabbed gtk3 figuremanager #2465
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
Conversation
Following the idea from PR #1849 the Navigation is always present for the figure manager, even if there is no toolbar. |
I tried to check this out to run it, but it looks like it needs a rebase -- it still contains a number of bugs from master (not in your changes) from a month ago that prevent it from running for me, and it would be good to have those fixes. Would you mind doing a rebase on the current master? They don't apply cleanly, and the resolutions should be clearer to you than to I. First, I think this is a welcome improvement. Tabbed interfaces are really the norm these days (in most browsers etc.) and the fact that matplotlib opens many different windows seems archaic. In the meantime, I'll comment on your goals stated above, without commenting on the code just yet.
Great.
I think this is also very welcome, but I'd prefer it if it were separate. When PRs get too big, they get very unwieldy to review and are much harder to get in. If the tabbed stuff depends on the toolbar stuff, why don't we do the toolbar stuff first...
That's good, for at least one release, and then in the future, once people are used to this, we could make it the default.
I like the functionality, though again the naming feels a bit off. Maybe
Sounds reasonable, though, again, I'd prefer to see this as a separate PR.
Again, I think that belongs in the toolbar PR.
Nice.
Are you willing to take on the other backends where this makes sense? It's a lot of work, but if we have good base class infrastructure, hopefully the changes should be fairly parallel in the other GUI backends.
I think this is also out-of-scope for this PR. It would be nice to fix that, but as a separate piece of work.
What does this do? Anyway, I hope that doesn't seem discouraging. In my experience, it's always much easier to review and accept changes that to explicit, well-defined things. I understand some of these are related, but if we could consider them in easy steps, I think this will go better. This is almost big enough of a change (since it requires a number of things to all fall in place) that the MEP process may have made sense in hindsight. |
…side with savefile
As I mentioned on the mailing list, I think it is a good idea factor the My view of this is based on the number of SO questions I see go by which relate to embedding. It is easy enough lots of people want to do it, but not easy enough for everyone to do it smoothly. |
For the moment I did only the rebase.
Done, or at least I think so (my git experience is not that great)
The problem here is that some tools need to be informed if the current figure changes (selected tab change).
No problem
Because of my class naming I was using parent for the "window" but I think it is OK to change it.
As I explained before it is going to be a little bit difficult due to the special tools. But I will try to do it.
To have the same toolbar for different figures, it is needed to separate the navigation from the toolbar.
I have a draft for tk and I could do it in gtk, but I don't have experience in Qt
Yes no problem I will remove this tool
This tool controls the legend, scale, min/max etc.. the most common things in the axes api.
I never thought of a MEP.... Please check it out and let me know what you think. |
From the mailing list conversation I agree with you, it is important to have this independent. |
I don't understand the errors that I'm getting, I don't think they are related. |
I think that the There should be some thought put into providing (for each toolkit) a widget for a) the just the |
The problem is that they pass ;) Remove |
In line with the idea of different PRs wouldn't it be better to leave the removing of pyplot dependencies for latter? |
After reviewing @mdboom comments, I will start with the toolbar PR. But before start taking apart my baby I just to make sure that this is something that you consider acceptable (because I don't want to do this more times than needed). For this first new PR At the end I will have three new base clases.
For the moment I will implement this only in Gtk3, and if someday we have everything accepted (that this PR proposes), I will implement in Tk and Gtk Does this seems like a good plan? I will leave this PR open as the big picture reference. |
I think the widget refactor/pyplot de-coupling should also be done first. But, yes sounds like a good plan. Try to make each PR as small as possible so that people can understand them in a reasonable amount of time. |
Here is the first small PR separating navigation and toolbar. #2557 @tacaswell My problem is that I am not 100% aware of what the decoupling implies, so I can not say that I will do it on my own. Do you have a draft or description of what has to be done? |
As a side note, this issue exists: #2194 |
@fariza Where did we leave this? |
@tacaswell I am working on a replacement that uses the MEP22 stuff, more aligned with MEP23 https://github.com/matplotlib/matplotlib/wiki/Mep23 |
That sounds reasonable to me. Really sorry about the epic odyssey getting these things review and merged as been. |
@tacaswell Do you know if any of this actually ever got implemented? I'm currently building a small application (Qt based), to help with a school project, which integrates multiple tabs in a figure manager. If I were to want to try and add any of this to mpl, I just wanted to see if there was existing structure in another backend that should be considered. |
@LindyBalboa I am waiting for MEP27#4143 to be merged before submiting my work on MEP23 (Multi Figure Manager). Check https://github.com/fariza/tabbed_backend |
Okay cool. I won't have a chance to play with that for a bit anyways. Got a couple other small things to take care of (plus exams. EW.) first. But glancing over your implementation, I should have no problem setting up something similar for Qt. Cool! |
@LindyBalboa Pr's are welcome, most of the work will be ported to main MPL in MEP23 |
@fariza @LindyBalboa Just came across this after I released a package that does this in QT: https://github.com/astromancer/mpl-multitab. Comments and feedback welcome. Keen to collaborate? |
@astromancer I wanted this to be backend agnostic, but never got enough interest. |
Updated description:
Main goals of this backend
Main characterstics of the multi-figure-backends
The PR includes:
The proposed implementation of the GTK3
I documented base classes following the numpydoc (did my best).