ginput(0) termination error

Hello list;

I'm new to python/matplotlib, migrating from IDL. I need to do some
interactive point selection with mouse, and the pyplot.ginput() routine
seemed to be just the right thing here. I do however need to be able to
make a not previously specified number of clicks, so ginput(n=0) is a
requirement.

However, when I press enter on my laptop (with no middle mouse button),
I get the error message:

TypeError: stop_event_loop() takes exactly 1 argument (2 given)

I've tried two different pieces of example code from the matplotlib SF
page.
I'm using Matplotlib 0.99.1 on Ubuntu 10.04.
Is there any solution or workaround? If I cannot have this
functionality, it is, unfortunately, kind of a deal breaker for at least
some of my work, and I'd like to keep it purely Python.

Best regards;

Emil

Bump - no one knows a solution/workaround to this?

···

Hello list;

I'm new to python/matplotlib, migrating from IDL. I need to do some
interactive point selection with mouse, and the pyplot.ginput() routine
seemed to be just the right thing here. I do however need to be able to
make a not previously specified number of clicks, so ginput(n=0) is a
requirement.

However, when I press enter on my laptop (with no middle mouse button),
I get the error message:

TypeError: stop_event_loop() takes exactly 1 argument (2 given)

I've tried two different pieces of example code from the matplotlib SF
page.
I'm using Matplotlib 0.99.1 on Ubuntu 10.04.
Is there any solution or workaround? If I cannot have this
functionality, it is, unfortunately, kind of a deal breaker for at least
some of my work, and I'd like to keep it purely Python.

Best regards;

Emil

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Can't you do ginput(n=1) in a while loop? Ginput needs to end at some point, right? Initiating a never ending loop seems like the wrong solution for any real-life problem.

···

On 06/07/2010 01:15 PM, Thøger Emil Juul Thorsen wrote:

Bump - no one knows a solution/workaround to this?

Hello list;

I'm new to python/matplotlib, migrating from IDL. I need to do some
interactive point selection with mouse, and the pyplot.ginput() routine
seemed to be just the right thing here. I do however need to be able to
make a not previously specified number of clicks, so ginput(n=0) is a
requirement.

However, when I press enter on my laptop (with no middle mouse button),
I get the error message:

TypeError: stop_event_loop() takes exactly 1 argument (2 given)

I've tried two different pieces of example code from the matplotlib SF
page.
I'm using Matplotlib 0.99.1 on Ubuntu 10.04.
Is there any solution or workaround? If I cannot have this
functionality, it is, unfortunately, kind of a deal breaker for at least
some of my work, and I'd like to keep it purely Python.

Best regards;

Emil

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
     
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I think this is a known bug (unfortunately, the bug fix does not seem
to be reflected in the maintenance version), but without a full
traceback, I'm not 100% sure.

You may use the svn version which have fixed this bug, or you may try
the workaround described in the link below (check the
clabel_monkeypatching.py).

http://sourceforge.net/tracker/index.php?func=detail&aid=2922835&group_id=80706&atid=560720

-JJ

2010/6/4 Thøger Emil Juul Thorsen <thoeger@...845...>:

···

Hello list;

I'm new to python/matplotlib, migrating from IDL. I need to do some
interactive point selection with mouse, and the pyplot.ginput() routine
seemed to be just the right thing here. I do however need to be able to
make a not previously specified number of clicks, so ginput(n=0) is a
requirement.

However, when I press enter on my laptop (with no middle mouse button),
I get the error message:

TypeError: stop_event_loop() takes exactly 1 argument (2 given)

I've tried two different pieces of example code from the matplotlib SF
page.
I'm using Matplotlib 0.99.1 on Ubuntu 10.04.
Is there any solution or workaround? If I cannot have this
functionality, it is, unfortunately, kind of a deal breaker for at least
some of my work, and I'd like to keep it purely Python.

Best regards;

Emil

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

See
http://sourceforge.net/tracker/?func=detail&atid=560720&aid=2908085&group_id=80706

To temporarily solve the problem and be able to use ginput, I applied
patch 8078 against my matplotlib installation (on debian)
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=rev&revision=8078

···

Le vendredi 04 juin 2010 à 15:25 +0200, Thøger Emil Juul Thorsen a écrit :

Hello list;

I'm new to python/matplotlib, migrating from IDL. I need to do some
interactive point selection with mouse, and the pyplot.ginput() routine
seemed to be just the right thing here. I do however need to be able to
make a not previously specified number of clicks, so ginput(n=0) is a
requirement.

However, when I press enter on my laptop (with no middle mouse button),
I get the error message:

TypeError: stop_event_loop() takes exactly 1 argument (2 given)

I've tried two different pieces of example code from the matplotlib SF
page.
I'm using Matplotlib 0.99.1 on Ubuntu 10.04.
Is there any solution or workaround? If I cannot have this
functionality, it is, unfortunately, kind of a deal breaker for at least
some of my work, and I'd like to keep it purely Python.

Thanks guys for your advice.

My mail server has been weird since yesterday so I only just saw your
messages now. In the meantime, I managed to hack and extend the
LineBuilder class code snippet at http://goo.gl/RLGS to actually meet my
needs better than ginput - but, obviously, much less portable and
elegant; I have only been working with Python for a couple of weeks.

···

On Mon, 2010-06-07 at 09:29 -0400, Jae-Joon Lee wrote:

I think this is a known bug (unfortunately, the bug fix does not seem
to be reflected in the maintenance version), but without a full
traceback, I'm not 100% sure.

You may use the svn version which have fixed this bug, or you may try
the workaround described in the link below (check the
clabel_monkeypatching.py).

http://sourceforge.net/tracker/index.php?func=detail&aid=2922835&group_id=80706&atid=560720

-JJ

2010/6/4 Thøger Emil Juul Thorsen <thoeger@...845...>:
> Hello list;
>
> I'm new to python/matplotlib, migrating from IDL. I need to do some
> interactive point selection with mouse, and the pyplot.ginput() routine
> seemed to be just the right thing here. I do however need to be able to
> make a not previously specified number of clicks, so ginput(n=0) is a
> requirement.
>
> However, when I press enter on my laptop (with no middle mouse button),
> I get the error message:
>
> TypeError: stop_event_loop() takes exactly 1 argument (2 given)
>
> I've tried two different pieces of example code from the matplotlib SF
> page.
> I'm using Matplotlib 0.99.1 on Ubuntu 10.04.
> Is there any solution or workaround? If I cannot have this
> functionality, it is, unfortunately, kind of a deal breaker for at least
> some of my work, and I'd like to keep it purely Python.
>
> Best regards;
>
> Emil
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>