Re: [matplotlib-devel] Alternate lasso: click to form polygon

2008-07-30 Thread Eric Bruning
On Tue, Jul 29, 2008 at 11:12 PM, Eric Firing <[EMAIL PROTECTED]> wrote:
> Eric Bruning wrote:
>>
>> On Tue, Jul 29, 2008 at 10:53 PM, Eric Firing <[EMAIL PROTECTED]> wrote:
>>>
>>> Eric Bruning wrote:
>
>>> I gave it a quick try with gtk backend.  The polygon is drawn based on
>>> clicks, but nothing gets printed.  Is this expected?
>>
>> That is unexpected. The callback should change the color of the
>> lassoed dots (from green to blue, for my default colormap) and print
>> the verts, the coords of the lassoed points, and the 'charge' array.
>>
>> Try adding a print in do_callback. One possibility is that the trigger
>> on idle_event isn't working.
>
> do_callback is not getting run.
>
> Eric

On Wed, Jul 30, 2008 at 5:40 AM, Mark Bakker <[EMAIL PROTECTED]> wrote:
> Hello Eric -
>
> I am interested. I wouldn't mind seeing it in mpl, but before we get there
> is there a chance you may want to share the code with me? I presume it is
> not long.

Hi Mark,

The code was attached to the original post. If you can't dig it out of
the archive, I'll send it personally. Let me know.

> My other question is: why do you want to click a polygon? Wouldn't drawing a
> rectangular box be less stress on your carpal tunnel?

My use case requires selecting from a set of points that are
distributed in a way that is unsuitable for selection with a
rectangle.

(cc'ing the mpl-dev list)
-Eric B

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] AttributeError: 'module' object has no attribute 'CallLater'

2008-07-30 Thread Nils Wagner
On Tue, 29 Jul 2008 16:43:42 -0500
  "John Hunter" <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 29, 2008 at 4:38 PM, Paul Kienzle 
><[EMAIL PROTECTED]> wrote:
> 
>> Okay, how about
>>if not hasattr(self,'IsVisible'):
>>self.IsVisible = lambda self: True
>> in __init__
>>
>> That way it will always think it is visible.
> 
> OK, Nils, I committed a minor variant of that in r5926. 
> Test again...
> 
> JDH

Hi John,

Sorry for the delay and thank you for your patience.
Here is the output of the "never-ending story"

Traceback (most recent call last):
   File 
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py", 
line 1099, in _onPaint
 self.draw(drawDC=drawDC)
   File 
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wxagg.py", 
line 64, in draw
 self.gui_repaint(drawDC=drawDC)
   File 
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py", 
line 1000, in gui_repaint
 if self.IsShownOnScreen():
TypeError: () takes exactly 1 argument (0 given)
Traceback (most recent call last):
   File 
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py", 
line 1101, in _onPaint
 self.gui_repaint(drawDC=drawDC)
   File 
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py", 
line 1000, in gui_repaint
 if self.IsShownOnScreen():
TypeError: () takes exactly 1 argument (0 given)
  
BTW, the entries are identical for both revisions.
Is that intended ?

r5923 | jdh2358 | 2008-07-29 20:01:16 +0200 (Di, 29 Jul 
2008) | 1 line

special case contains test for degenerate rectangle

r5922 | jdh2358 | 2008-07-29 19:47:50 +0200 (Di, 29 Jul 
2008) | 1 line

special case contains test for degenerate rectangle



-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] AttributeError: 'module' object has no attribute 'CallLater'

2008-07-30 Thread John Hunter
On Wed, Jul 30, 2008 at 10:58 AM, Nils Wagner
<[EMAIL PROTECTED]> wrote:

> Sorry for the delay and thank you for your patience.
> Here is the output of the "never-ending story"

Could you try again with r5932

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Alternate lasso: click to form polygon

2008-07-30 Thread Eric Bruning
I tried with the Tk backend, and I'm seeing the same problem as Eric F
has with GTK. The problem seems to be with idle_event not getting
triggered on some of the backends.

The checkins having to do with idle_event from the end of June
indicate that idle_event is still somewhat experimental.

What's the current status of idle_event? Can I help in some way?

If idle_event can't be made robust, I'll need to look for another
method to address the following problem. When I close off the polygon,
I determined that I needed to fall back to the idle state to be able
to see the closed polygon. My code, itself triggered off a right mouse
click, was apparently blocking drawing to the screen.  It is desirable
to see the closed polygon on screen before the polygon callback in the
event that the callback takes a long time.

Thanks,
Eric

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Alternate lasso: click to form polygon

2008-07-30 Thread John Hunter
On Wed, Jul 30, 2008 at 4:31 PM, Eric Bruning <[EMAIL PROTECTED]> wrote:
> I tried with the Tk backend, and I'm seeing the same problem as Eric F
> has with GTK. The problem seems to be with idle_event not getting
> triggered on some of the backends.
>
> The checkins having to do with idle_event from the end of June
> indicate that idle_event is still somewhat experimental.
>
> What's the current status of idle_event? Can I help in some way?

I was working on idle event, to make a backend neutral api for idle
processing, animation, etc...  There was a particularly nasty problem
with tk since I had to do the threading calls myself and I am no
threading guru, so I reverted some of the changes, mainly because of
the problem of cross thread signal handling blocked the CTRL-C
interrupts.  These changes were added in r5652

  r5652 | jdh2358 | 2008-06-23 16:39:11 -0500 (Mon, 23 Jun 2008) | 1 line

  draft idle/timeout api

and subsequent refactoring

  r5653 | jdh2358 | 2008-06-23 23:17:21 -0500 (Mon, 23 Jun 2008) | 1 line

  replaced idle handler with idle event

but then reverted when Nils reported the CTRL-C bug in

  r5655 | jdh2358 | 2008-06-24 08:56:55 -0500 (Tue, 24 Jun 2008) | 1 line

  removed idle support from tkagg until I figure out interrupts

So the implementation is incomplete and tkagg needs to most work,
since for other GUIs it is fairly easy to pass through the native
enent handling.  I am not sure what the problem is with GTK right now,
and haven't had a chance to look at it.

JDH

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel