| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Following the idea from PR #1849 the Navigation is always present for the figure manager, even if there is no toolbar. |
Sorry, something went wrong.
|
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...
reparent seems a bit obscure to me. Maybe attach (which feels nice and symmetrical to detach, to me). And maybe we could do this in one step, with a move_to method, which would move a figure into another figure manager?
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 window or in_window?
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. |
Sorry, something went wrong.
…side with savefile
|
As I mentioned on the mailing list, I think it is a good idea factor the pyplot dependencies out of the figure_manager classes. This looks like it is going to be split up into a bunch of PRs anyway, that re-factoring should at least be considered as part of this process. 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. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
From the mailing list conversation I agree with you, it is important to have this independent. |
Sorry, something went wrong.
|
I don't understand the errors that I'm getting, I don't think they are related. |
Sorry, something went wrong.
|
I think that the import _pyhelper and the Gcf are the only dependencies so ripping it out shouldn't be too hard (create figure_manager_base which has everything but Gcf and than make figure_manager sub-class it to add the Gcf back in). There should be some thought put into providing (for each toolkit) a widget for a) the just the Figure b) the Figure + toolbar c) a stand alone window. I might have time to work on this in the new year, but if you are ripping this part now, and don't mind, you might as well do this as I think this kind of re-factoring will make it easier to do the multi-tab work on all of the backends. |
Sorry, something went wrong.
|
The problem is that they pass ;) Remove backend_gtkcairo.py from the exclude list in https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/tests/test_coding_standards.py#L109 The exclude list is there so that files could start being tested with out having to overhaul the entire library in one shot. Once a file is clean, this error makes sure it won't stay on the exclude list and hence be able to regress. |
Sorry, something went wrong.
|
In line with the idea of different PRs wouldn't it be better to leave the removing of pyplot dependencies for latter? |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
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? |
Sorry, something went wrong.
|
As a side note, this issue exists: #2194 |
Sorry, something went wrong.
|
@tacaswell I am working on a replacement that uses the MEP22 stuff, more aligned with MEP23 https://github.com/matplotlib/matplotlib/wiki/Mep23 |
Sorry, something went wrong.
|
That sounds reasonable to me. Really sorry about the epic odyssey getting these things review and merged as been. |
Sorry, something went wrong.
|
@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. |
Sorry, something went wrong.
|
@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 |
Sorry, something went wrong.
|
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! |
Sorry, something went wrong.
|
@LindyBalboa Pr's are welcome, most of the work will be ported to main MPL in MEP23 |
Sorry, something went wrong.
|
@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? |
Sorry, something went wrong.
|
@astromancer I wanted this to be backend agnostic, but never got enough interest. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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).