Hello everybody:
This is my first post here, I am a little bit nervous, because this is my first post :D, and also because I want to talk about a touchy subject…
In my work I have developped several backends to manage multiple figures at the same time, from what I see around, this is something that could be of interest for many people.
I have done it in gtk, wx, tk, and now I am doing it again in gtk3.
So I thought it would be nice to try to run this idea by you.
If you look at the attached images, you will see what I mean.
The code is in
https://github.com/fariza/matplotlib/tree/tabbed-gtk3-figuremanager
I know I should have done another file for the figure manager, but because it sits in between backend_bases.py and backend_gtk3xxx.py It was easier for me to test directly inside backend_gtk3.py
Other think that I dislike, is that to extend the current backend, you have to get your hands pretty dirty and understand alot of things to make sense of how things work.
I modified examples/pylab_examples/multiple_figs_demo.py
to show it working.
In the example, I added a stupid class, to show how can we attach external tools to the toolbar without complex manipulations.
Also, this could be used to produce a tools library, and keeps things clean, in gtk3 backend there is a DialogLineprops, in qt there are other things similar, but all of them are separated and can not be reused…
Take a look and let me know what you think.
The only think needed to run with other examples is to use (gtk3 agg or cairo) and set the rcparam
matplotlib.use(‘gtk3agg’)
matplotlib.rcParams[‘backend.gtk3.tabbed’] = True
I tried to comment the code, but not to document it, because I want to have feedback before investing time in documenting something that maybe will be only for me.
Thanks
Federico
···
–
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?
– Antonio Alducin –