Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2008-01-19 Thread Rob Hetland
On Jan 18, 2008, at 8:42 PM, Michael Droettboom wrote: I think that would be worthwhile just to avoid (well, reduce) these problems when interface changes occur in the future. Since you were forced to copy-and-paste poly_editor as a starting point, rather than inheriting from it, there's

Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2008-01-18 Thread Michael Droettboom
It looks as if poly_editor is broken in 0.91.2 and the trunk. Is that your observation as well? This has been fixed in SVN (on both the trunk and the 0.91.x branch). On both versions, the line (that makes up the draggable markers) was never added to the axes, so it doesn't get a transform,

Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2008-01-18 Thread Michael Droettboom
Rob Hetland wrote: On Jan 18, 2008, at 7:00 PM, Michael Droettboom wrote: It looks as if poly_editor is broken in 0.91.2 and the trunk. Is that your observation as well? Yes. This has been fixed in SVN (on both the trunk and the 0.91.x branch). On both versions, the line (that

Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2008-01-18 Thread Michael Droettboom
lasso_demo.py is working again on the trunk. The problem was not transforms related. The problem is in the way the colors were being updated after the markers were selected. On the trunk, the set of facecolors in a collection is stored as a numpy array for efficiency. This meant that the

Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2008-01-18 Thread Rob Hetland
On Jan 18, 2008, at 7:00 PM, Michael Droettboom wrote: It looks as if poly_editor is broken in 0.91.2 and the trunk. Is that your observation as well? Yes. This has been fixed in SVN (on both the trunk and the 0.91.x branch). On both versions, the line (that makes up the draggable

Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2008-01-17 Thread Rob Hetland
I do this sort of stuff all of the time. I have a tool that is interactive, making a polygon that you can edit (similar to poly_editor in the examples), that is linked to the polygeom class below, but it is broken in the new transforms release of the code. poly_editor is also broken, by

Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2008-01-17 Thread Michael Droettboom
John Hunter wrote: On Jan 4, 2008 4:33 PM, Mephisto [EMAIL PROTECTED] wrote: For some simple but effective Python code you can use to create a mask similar to that provided by the Matlab roipoly function, see http://www.ariel.com.au/a/python-point-int-poly.html

Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2008-01-17 Thread Venkat Ramanan
Hi all, Thanks for the helpful responses. I had switched back to Matlab, meanwhile. lasso_demo.py does look close to what I had wanted to implement. Earlier, while checking it out, I must have right-clicked first and after that it didn't seem to work ( perhaps a bug? ). I'll look in to Rob's

Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2008-01-16 Thread Mephisto
For some simple but effective Python code you can use to create a mask similar to that provided by the Matlab roipoly function, see http://www.ariel.com.au/a/python-point-int-poly.html http://www.ariel.com.au/a/python-point-int-poly.html . The code seems to be quite effective. Venkat Ramanan

Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2008-01-16 Thread John Hunter
On Jan 4, 2008 4:33 PM, Mephisto [EMAIL PROTECTED] wrote: For some simple but effective Python code you can use to create a mask similar to that provided by the Matlab roipoly function, see http://www.ariel.com.au/a/python-point-int-poly.html

Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2007-12-10 Thread Venkat Ramanan
Thanks for the pointer. The matplotlib.widget.Cursor works much better for displaying crosshairs. ( due to blitting? ) I still haven't found a tool yet for drawing a polygon. The lasso_demo.py doesn't run on my system. Well, it runs, displays a scatter of points, but I'm not sure what is it

Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2007-12-07 Thread Darren Dale
On Friday 07 December 2007 7:19:04 am José Gómez-Dans wrote: Hi, On Thursday 06 December 2007 19:39:59 Venkat Ramanan wrote: I'm looking for something analogous to Matlab's ginput() and roipoly(). I'm no expert on this, but have a look at the lasso_demo.py example, which shows something

Re: [Matplotlib-users] Cross hair and polygon drawing tools.

2007-12-07 Thread José Gómez-Dans
Hi, On Thursday 06 December 2007 19:39:59 Venkat Ramanan wrote: I'm looking for something analogous to Matlab's ginput() and roipoly(). I'm no expert on this, but have a look at the lasso_demo.py example, which shows something akin to roipoly(), and pick_event_demo.py and pick_even_demo2.py,

[Matplotlib-users] Cross hair and polygon drawing tools.

2007-12-06 Thread Venkat Ramanan
Hi, I'm looking for something analogous to Matlab's ginput() and roipoly(). ginput() basically displays a crosshair on the current figure and allows us to select points by clicking on it. It returns the x,y coordinates of the points. roipoly() allows us to define a polygon by clicking on the