Re: [Matplotlib-users] Draggable is not working on multiple legends of plots which are generated with twinx()

2015-03-11 Thread Benjamin Root
Thomas described the work-around and provided a link. Put both of the
legends on the second axes. It is a kludge, for sure, but it is all you can
do.

On Wed, Mar 11, 2015 at 10:58 AM, liu lily politoeso...@gmail.com wrote:

 thanks,
 then are there any workaround on my case?
 or are there any other libaries which I CAN use to plot and manipulate the
 GUI?

 On Wed, Mar 11, 2015 at 3:54 PM, Benjamin Root ben.r...@ou.edu wrote:

 By top he means whichever axes was added most recently. When twining,
 the new axes is added on top of the original axes.

 I hope that clears it up.

 Ben Root

 On Wed, Mar 11, 2015 at 10:05 AM, liu lily politoeso...@gmail.com
 wrote:

 I dont understand
 you say it is the first axe
 but why in my case, only the second legend is draggable? it is in the
 second axe

 besides, since I have to use both y-axis on the left and on the right,
 it seems I have to have two axes,
 are there any workarounds? thanks!

 On Wed, Mar 11, 2015 at 2:22 PM, Thomas Caswell tcasw...@gmail.com
 wrote:

 The mouse events only propagate to the top axes.  You will have to add
 both legends to the same (top) axes.

 See http://matplotlib.org/users/legend_guide.html#multiple-legend


 Tom
 On Wed, Mar 11, 2015, 08:57 liu lily politoeso...@gmail.com wrote:

 Hi, all:

 I have two legends, as below, I find that I can't drag the first
 legend, what is the problem? how to deal with it? thanks!

 import matplotlib.pyplot as plt

 fig1, ax1 = plt.subplots()
 ax2 = ax1.twinx()

 ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label=one)
 ax2.plot([1,2,3],[5,6,7],'ro', label=two)

 leg1 = ax1.legend()
 leg2 = ax2.legend()

 leg1.draggable(state=True)
 leg2.draggable(state=True)
 plt.show()

 
 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub
 for all
 things parallel software development, from weekly thought leadership
 blogs to
 news, videos, case studies, tutorials and more. Take a look and join
 the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users




 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub
 for all
 things parallel software development, from weekly thought leadership
 blogs to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users




--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Draggable is not working on multiple legends of plots which are generated with twinx()

2015-03-11 Thread liu lily
thanks,
then are there any workaround on my case?
or are there any other libaries which I CAN use to plot and manipulate the
GUI?

On Wed, Mar 11, 2015 at 3:54 PM, Benjamin Root ben.r...@ou.edu wrote:

 By top he means whichever axes was added most recently. When twining,
 the new axes is added on top of the original axes.

 I hope that clears it up.

 Ben Root

 On Wed, Mar 11, 2015 at 10:05 AM, liu lily politoeso...@gmail.com wrote:

 I dont understand
 you say it is the first axe
 but why in my case, only the second legend is draggable? it is in the
 second axe

 besides, since I have to use both y-axis on the left and on the right, it
 seems I have to have two axes,
 are there any workarounds? thanks!

 On Wed, Mar 11, 2015 at 2:22 PM, Thomas Caswell tcasw...@gmail.com
 wrote:

 The mouse events only propagate to the top axes.  You will have to add
 both legends to the same (top) axes.

 See http://matplotlib.org/users/legend_guide.html#multiple-legend


 Tom
 On Wed, Mar 11, 2015, 08:57 liu lily politoeso...@gmail.com wrote:

 Hi, all:

 I have two legends, as below, I find that I can't drag the first
 legend, what is the problem? how to deal with it? thanks!

 import matplotlib.pyplot as plt

 fig1, ax1 = plt.subplots()
 ax2 = ax1.twinx()

 ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label=one)
 ax2.plot([1,2,3],[5,6,7],'ro', label=two)

 leg1 = ax1.legend()
 leg2 = ax2.legend()

 leg1.draggable(state=True)
 leg2.draggable(state=True)
 plt.show()

 
 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub
 for all
 things parallel software development, from weekly thought leadership
 blogs to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users




 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub
 for all
 things parallel software development, from weekly thought leadership
 blogs to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Draggable is not working on multiple legends of plots which are generated with twinx()

2015-03-11 Thread Benjamin Root
By top he means whichever axes was added most recently. When twining,
the new axes is added on top of the original axes.

I hope that clears it up.

Ben Root

On Wed, Mar 11, 2015 at 10:05 AM, liu lily politoeso...@gmail.com wrote:

 I dont understand
 you say it is the first axe
 but why in my case, only the second legend is draggable? it is in the
 second axe

 besides, since I have to use both y-axis on the left and on the right, it
 seems I have to have two axes,
 are there any workarounds? thanks!

 On Wed, Mar 11, 2015 at 2:22 PM, Thomas Caswell tcasw...@gmail.com
 wrote:

 The mouse events only propagate to the top axes.  You will have to add
 both legends to the same (top) axes.

 See http://matplotlib.org/users/legend_guide.html#multiple-legend


 Tom
 On Wed, Mar 11, 2015, 08:57 liu lily politoeso...@gmail.com wrote:

 Hi, all:

 I have two legends, as below, I find that I can't drag the first legend,
 what is the problem? how to deal with it? thanks!

 import matplotlib.pyplot as plt

 fig1, ax1 = plt.subplots()
 ax2 = ax1.twinx()

 ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label=one)
 ax2.plot([1,2,3],[5,6,7],'ro', label=two)

 leg1 = ax1.legend()
 leg2 = ax2.legend()

 leg1.draggable(state=True)
 leg2.draggable(state=True)
 plt.show()

 
 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub
 for all
 things parallel software development, from weekly thought leadership
 blogs to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users




 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub for
 all
 things parallel software development, from weekly thought leadership blogs
 to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Draggable is not working on multiple legends of plots which are generated with twinx()

2015-03-11 Thread Thomas Caswell
As I said in the first email, you need to put both legend artists on the
top axes.  The link is to the documentation on _how_ to put more than one
legend in the same axes.

Tom

On Wed, Mar 11, 2015 at 10:58 AM liu lily politoeso...@gmail.com wrote:

 thanks,
 then are there any workaround on my case?
 or are there any other libaries which I CAN use to plot and manipulate the
 GUI?

 On Wed, Mar 11, 2015 at 3:54 PM, Benjamin Root ben.r...@ou.edu wrote:

 By top he means whichever axes was added most recently. When twining,
 the new axes is added on top of the original axes.

 I hope that clears it up.

 Ben Root

 On Wed, Mar 11, 2015 at 10:05 AM, liu lily politoeso...@gmail.com
 wrote:

 I dont understand
 you say it is the first axe
 but why in my case, only the second legend is draggable? it is in the
 second axe

 besides, since I have to use both y-axis on the left and on the right,
 it seems I have to have two axes,
 are there any workarounds? thanks!

 On Wed, Mar 11, 2015 at 2:22 PM, Thomas Caswell tcasw...@gmail.com
 wrote:

 The mouse events only propagate to the top axes.  You will have to add
 both legends to the same (top) axes.

 See http://matplotlib.org/users/legend_guide.html#multiple-legend


 Tom
 On Wed, Mar 11, 2015, 08:57 liu lily politoeso...@gmail.com wrote:

 Hi, all:

 I have two legends, as below, I find that I can't drag the first
 legend, what is the problem? how to deal with it? thanks!

 import matplotlib.pyplot as plt

 fig1, ax1 = plt.subplots()
 ax2 = ax1.twinx()

 ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label=one)
 ax2.plot([1,2,3],[5,6,7],'ro', label=two)

 leg1 = ax1.legend()
 leg2 = ax2.legend()

 leg1.draggable(state=True)
 leg2.draggable(state=True)
 plt.show()

 
 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub
 for all
 things parallel software development, from weekly thought leadership
 blogs to
 news, videos, case studies, tutorials and more. Take a look and join
 the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users




 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub
 for all
 things parallel software development, from weekly thought leadership
 blogs to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users




--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Draggable is not working on multiple legends of plots which are generated with twinx()

2015-03-11 Thread liu lily
Hi, all:

I have two legends, as below, I find that I can't drag the first legend,
what is the problem? how to deal with it? thanks!

import matplotlib.pyplot as plt

fig1, ax1 = plt.subplots()
ax2 = ax1.twinx()

ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label=one)
ax2.plot([1,2,3],[5,6,7],'ro', label=two)

leg1 = ax1.legend()
leg2 = ax2.legend()

leg1.draggable(state=True)
leg2.draggable(state=True)
plt.show()
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Draggable is not working on multiple legends of plots which are generated with twinx()

2015-03-11 Thread Thomas Caswell
The mouse events only propagate to the top axes.  You will have to add both
legends to the same (top) axes.

See http://matplotlib.org/users/legend_guide.html#multiple-legend


Tom
On Wed, Mar 11, 2015, 08:57 liu lily politoeso...@gmail.com wrote:

 Hi, all:

 I have two legends, as below, I find that I can't drag the first legend,
 what is the problem? how to deal with it? thanks!

 import matplotlib.pyplot as plt

 fig1, ax1 = plt.subplots()
 ax2 = ax1.twinx()

 ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label=one)
 ax2.plot([1,2,3],[5,6,7],'ro', label=two)

 leg1 = ax1.legend()
 leg2 = ax2.legend()

 leg1.draggable(state=True)
 leg2.draggable(state=True)
 plt.show()

 
 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub for
 all
 things parallel software development, from weekly thought leadership blogs
 to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Draggable is not working on multiple legends of plots which are generated with twinx()

2015-03-11 Thread liu lily
I dont understand
you say it is the first axe
but why in my case, only the second legend is draggable? it is in the
second axe

besides, since I have to use both y-axis on the left and on the right, it
seems I have to have two axes,
are there any workarounds? thanks!

On Wed, Mar 11, 2015 at 2:22 PM, Thomas Caswell tcasw...@gmail.com wrote:

 The mouse events only propagate to the top axes.  You will have to add
 both legends to the same (top) axes.

 See http://matplotlib.org/users/legend_guide.html#multiple-legend


 Tom
 On Wed, Mar 11, 2015, 08:57 liu lily politoeso...@gmail.com wrote:

 Hi, all:

 I have two legends, as below, I find that I can't drag the first legend,
 what is the problem? how to deal with it? thanks!

 import matplotlib.pyplot as plt

 fig1, ax1 = plt.subplots()
 ax2 = ax1.twinx()

 ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label=one)
 ax2.plot([1,2,3],[5,6,7],'ro', label=two)

 leg1 = ax1.legend()
 leg2 = ax2.legend()

 leg1.draggable(state=True)
 leg2.draggable(state=True)
 plt.show()

 
 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub
 for all
 things parallel software development, from weekly thought leadership
 blogs to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users