muilti figure backend

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

normal_gtk3agg.pngtabbed_gtk3agg.png

···


Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

– Antonio Alducin –

No need to be nervous. We are a friendly bunch and this is cool stuff.

I haven’t looked at your code (a diff link would be useful), but the obvious first questions would be:

  • Can I display multiple tabs at the same time (i.e. tab splitting)
  • If so, can I programatically control the splitting?
    On that front, did you consider looking at implementing the tabbing in matplotlib itself? Obviously there is nothing there at the moment, but it is conceivable that “tab” buttons could be added to a special “figure” which when clicked change which figure is being rendered in the plot area. Doing so would mean that your GUI doesn’t look like native tabs, but it would mean that it would instantly work on all interactive backends. Just a thought.

Anyway, I’m not sure how we take this forward - I can’t imagine we would want to take on a whole new set of backends for tabbed browsing specifically, but it could potentially be integrated together with the existing backends I suppose.

Nice work!

Phil

tabbed_gtk3agg.png

normal_gtk3agg.png

···

On 18 September 2013 01:07, Federico Ariza <ariza.federico@…149…> wrote:

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 –


LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!

1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint

2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes

Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.

http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk


Matplotlib-devel mailing list

Matplotlib-devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

I forgot about the diff link.

https://github.com/fariza/matplotlib/compare/tabbed-gtk3-figuremanager

I try to place everything where it is supposed to go (backend_bases)

No need to be nervous. We are a friendly bunch and this is cool stuff.

I haven't looked at your code (a diff link would be useful), but the obvious first questions would be:

Can I display multiple tabs at the same time (i.e. tab splitting)

At first sight, I do not see why not, the multiFigureBackend just
controls adding, removing and switching from one figure to another.
Giving the toolbar control to the active figure.

If so, can I programatically control the splitting?

I was thinking about this, and I think it is possible to add as many
instances of the MultiFigureManager as we want, and place figures in
the desired one. Removing and adding them is also possible.

On that front, did you consider looking at implementing the tabbing in matplotlib itself? Obviously there is nothing there at the moment, but it is conceivable that "tab" buttons could be added to a special "figure" which when clicked change which figure is being rendered in the plot area. Doing so would mean that your GUI doesn't look like native tabs, but it would mean that it would instantly work on all interactive backends. Just a thought.

I did not think about this, but to be honest, I do not like the
matplotlib widgets :frowning:

Anyway, I'm not sure how we take this forward - I can't imagine we would want to take on a whole new set of backends for tabbed browsing specifically, but it could potentially be integrated together with the existing backends I suppose.

As I tried to implement it, if the corresponding MultiFigureBackend is
implemented for the selected backend, and
matplotlib.rcParams['backend.single_window'] = True
This will be loaded if not, the traditional backend work as always.

Of course all of these possibilities have to be tested, to see...

···

On Wed, Sep 18, 2013 at 8:38 AM, Phil Elson <pelson.pub@...149...> wrote:

Nice work!

Phil

On 18 September 2013 01:07, Federico Ariza <ariza.federico@...149...> wrote:

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 --

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin -

Hello

To address the concern of display multiple figures at the same time.
I added detach and re-parent methods to the figure manager, so figures
can be programatically redistributed between containers.

Also I added a couple of tools that I use a lot, one for line
properties and one for axes properties.

I got rid of the non working linedialog and replaced completely the
FigureManagerGtk3 and Toolbar2Gtk3

I would greatly appreciate some feedback to see if I am going in the
right direction.

As I mentioned before, there is not much in terms of documentation
yet, because I do not want to spend time documenting something that I
am not sure is useful to somebody else.

Thanks
Federico

···

On Wed, Sep 18, 2013 at 12:13 PM, Federico Ariza <ariza.federico@...149...> wrote:

I forgot about the diff link.

https://github.com/fariza/matplotlib/compare/tabbed-gtk3-figuremanager

I try to place everything where it is supposed to go (backend_bases)

On Wed, Sep 18, 2013 at 8:38 AM, Phil Elson <pelson.pub@...149...> wrote:

No need to be nervous. We are a friendly bunch and this is cool stuff.

I haven't looked at your code (a diff link would be useful), but the obvious first questions would be:

Can I display multiple tabs at the same time (i.e. tab splitting)

At first sight, I do not see why not, the multiFigureBackend just
controls adding, removing and switching from one figure to another.
Giving the toolbar control to the active figure.

If so, can I programatically control the splitting?

I was thinking about this, and I think it is possible to add as many
instances of the MultiFigureManager as we want, and place figures in
the desired one. Removing and adding them is also possible.

On that front, did you consider looking at implementing the tabbing in matplotlib itself? Obviously there is nothing there at the moment, but it is conceivable that "tab" buttons could be added to a special "figure" which when clicked change which figure is being rendered in the plot area. Doing so would mean that your GUI doesn't look like native tabs, but it would mean that it would instantly work on all interactive backends. Just a thought.

I did not think about this, but to be honest, I do not like the
matplotlib widgets :frowning:

Anyway, I'm not sure how we take this forward - I can't imagine we would want to take on a whole new set of backends for tabbed browsing specifically, but it could potentially be integrated together with the existing backends I suppose.

As I tried to implement it, if the corresponding MultiFigureBackend is
implemented for the selected backend, and
matplotlib.rcParams['backend.single_window'] = True
This will be loaded if not, the traditional backend work as always.

Of course all of these possibilities have to be tested, to see...

Nice work!

Phil

On 18 September 2013 01:07, Federico Ariza <ariza.federico@...149...> wrote:

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 --

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin -

--
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin --

Is there a pull request open for this? If not, could you create one?

Mike

···

On 09/25/2013 03:04 PM, Federico Ariza wrote:

Hello

To address the concern of display multiple figures at the same time.
I added detach and re-parent methods to the figure manager, so figures
can be programatically redistributed between containers.

Also I added a couple of tools that I use a lot, one for line
properties and one for axes properties.

I got rid of the non working linedialog and replaced completely the
FigureManagerGtk3 and Toolbar2Gtk3

I would greatly appreciate some feedback to see if I am going in the
right direction.

As I mentioned before, there is not much in terms of documentation
yet, because I do not want to spend time documenting something that I
am not sure is useful to somebody else.

Thanks
Federico

On Wed, Sep 18, 2013 at 12:13 PM, Federico Ariza > <ariza.federico@...149...> wrote:

I forgot about the diff link.

https://github.com/fariza/matplotlib/compare/tabbed-gtk3-figuremanager

I try to place everything where it is supposed to go (backend_bases)

On Wed, Sep 18, 2013 at 8:38 AM, Phil Elson <pelson.pub@...149...> wrote:

No need to be nervous. We are a friendly bunch and this is cool stuff.

I haven't looked at your code (a diff link would be useful), but the obvious first questions would be:

Can I display multiple tabs at the same time (i.e. tab splitting)

At first sight, I do not see why not, the multiFigureBackend just
controls adding, removing and switching from one figure to another.
Giving the toolbar control to the active figure.

If so, can I programatically control the splitting?

I was thinking about this, and I think it is possible to add as many
instances of the MultiFigureManager as we want, and place figures in
the desired one. Removing and adding them is also possible.

On that front, did you consider looking at implementing the tabbing in matplotlib itself? Obviously there is nothing there at the moment, but it is conceivable that "tab" buttons could be added to a special "figure" which when clicked change which figure is being rendered in the plot area. Doing so would mean that your GUI doesn't look like native tabs, but it would mean that it would instantly work on all interactive backends. Just a thought.

I did not think about this, but to be honest, I do not like the
matplotlib widgets :frowning:

Anyway, I'm not sure how we take this forward - I can't imagine we would want to take on a whole new set of backends for tabbed browsing specifically, but it could potentially be integrated together with the existing backends I suppose.

As I tried to implement it, if the corresponding MultiFigureBackend is
implemented for the selected backend, and
matplotlib.rcParams['backend.single_window'] = True
This will be loaded if not, the traditional backend work as always.

Of course all of these possibilities have to be tested, to see...

Nice work!

Phil

On 18 September 2013 01:07, Federico Ariza <ariza.federico@...149...> wrote:

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 --

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin -

--
                    _

\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
>>(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

No there is no pull request.

I wanted to get some feedback before, as the development workflow suggested.

Federico

···

On Wed, Sep 25, 2013 at 3:25 PM, Michael Droettboom <mdroe@...31...> wrote:

Is there a pull request open for this? If not, could you create one?

Mike

On 09/25/2013 03:04 PM, Federico Ariza wrote:

Hello

To address the concern of display multiple figures at the same time.
I added detach and re-parent methods to the figure manager, so figures
can be programatically redistributed between containers.

Also I added a couple of tools that I use a lot, one for line
properties and one for axes properties.

I got rid of the non working linedialog and replaced completely the
FigureManagerGtk3 and Toolbar2Gtk3

I would greatly appreciate some feedback to see if I am going in the
right direction.

As I mentioned before, there is not much in terms of documentation
yet, because I do not want to spend time documenting something that I
am not sure is useful to somebody else.

Thanks
Federico

On Wed, Sep 18, 2013 at 12:13 PM, Federico Ariza >> <ariza.federico@...149...> wrote:

I forgot about the diff link.

https://github.com/fariza/matplotlib/compare/tabbed-gtk3-figuremanager

I try to place everything where it is supposed to go (backend_bases)

On Wed, Sep 18, 2013 at 8:38 AM, Phil Elson <pelson.pub@...149...> wrote:

No need to be nervous. We are a friendly bunch and this is cool stuff.

I haven't looked at your code (a diff link would be useful), but the obvious first questions would be:

Can I display multiple tabs at the same time (i.e. tab splitting)

At first sight, I do not see why not, the multiFigureBackend just
controls adding, removing and switching from one figure to another.
Giving the toolbar control to the active figure.

If so, can I programatically control the splitting?

I was thinking about this, and I think it is possible to add as many
instances of the MultiFigureManager as we want, and place figures in
the desired one. Removing and adding them is also possible.

On that front, did you consider looking at implementing the tabbing in matplotlib itself? Obviously there is nothing there at the moment, but it is conceivable that "tab" buttons could be added to a special "figure" which when clicked change which figure is being rendered in the plot area. Doing so would mean that your GUI doesn't look like native tabs, but it would mean that it would instantly work on all interactive backends. Just a thought.

I did not think about this, but to be honest, I do not like the
matplotlib widgets :frowning:

Anyway, I'm not sure how we take this forward - I can't imagine we would want to take on a whole new set of backends for tabbed browsing specifically, but it could potentially be integrated together with the existing backends I suppose.

As I tried to implement it, if the corresponding MultiFigureBackend is
implemented for the selected backend, and
matplotlib.rcParams['backend.single_window'] = True
This will be loaded if not, the traditional backend work as always.

Of course all of these possibilities have to be tested, to see...

Nice work!

Phil

On 18 September 2013 01:07, Federico Ariza <ariza.federico@...149...> wrote:

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 --

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin -

--
                    _
>\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
> >>(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin --

I did the PR :slight_smile:

https://github.com/matplotlib/matplotlib/pull/2465

I tried my best to follow the coding_guide, one thing that I did not
find, were the tests for the interactive backends.

Thanks
Federico

···

On Wed, Sep 25, 2013 at 3:36 PM, Federico Ariza <ariza.federico@...149...> wrote:

No there is no pull request.

I wanted to get some feedback before, as the development workflow suggested.

Federico

On Wed, Sep 25, 2013 at 3:25 PM, Michael Droettboom <mdroe@...31...> wrote:

Is there a pull request open for this? If not, could you create one?

Mike

On 09/25/2013 03:04 PM, Federico Ariza wrote:

Hello

To address the concern of display multiple figures at the same time.
I added detach and re-parent methods to the figure manager, so figures
can be programatically redistributed between containers.

Also I added a couple of tools that I use a lot, one for line
properties and one for axes properties.

I got rid of the non working linedialog and replaced completely the
FigureManagerGtk3 and Toolbar2Gtk3

I would greatly appreciate some feedback to see if I am going in the
right direction.

As I mentioned before, there is not much in terms of documentation
yet, because I do not want to spend time documenting something that I
am not sure is useful to somebody else.

Thanks
Federico

On Wed, Sep 18, 2013 at 12:13 PM, Federico Ariza >>> <ariza.federico@...149...> wrote:

I forgot about the diff link.

https://github.com/fariza/matplotlib/compare/tabbed-gtk3-figuremanager

I try to place everything where it is supposed to go (backend_bases)

On Wed, Sep 18, 2013 at 8:38 AM, Phil Elson <pelson.pub@...149...> wrote:

No need to be nervous. We are a friendly bunch and this is cool stuff.

I haven't looked at your code (a diff link would be useful), but the obvious first questions would be:

Can I display multiple tabs at the same time (i.e. tab splitting)

At first sight, I do not see why not, the multiFigureBackend just
controls adding, removing and switching from one figure to another.
Giving the toolbar control to the active figure.

If so, can I programatically control the splitting?

I was thinking about this, and I think it is possible to add as many
instances of the MultiFigureManager as we want, and place figures in
the desired one. Removing and adding them is also possible.

On that front, did you consider looking at implementing the tabbing in matplotlib itself? Obviously there is nothing there at the moment, but it is conceivable that "tab" buttons could be added to a special "figure" which when clicked change which figure is being rendered in the plot area. Doing so would mean that your GUI doesn't look like native tabs, but it would mean that it would instantly work on all interactive backends. Just a thought.

I did not think about this, but to be honest, I do not like the
matplotlib widgets :frowning:

Anyway, I'm not sure how we take this forward - I can't imagine we would want to take on a whole new set of backends for tabbed browsing specifically, but it could potentially be integrated together with the existing backends I suppose.

As I tried to implement it, if the corresponding MultiFigureBackend is
implemented for the selected backend, and
matplotlib.rcParams['backend.single_window'] = True
This will be loaded if not, the traditional backend work as always.

Of course all of these possibilities have to be tested, to see...

Nice work!

Phil

On 18 September 2013 01:07, Federico Ariza <ariza.federico@...149...> wrote:

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 --

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin -

--
                    _
>\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
> >>(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin --

--
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin --