reckoner:



    >>> th= array([ 4.65542641,  5.32920696,  2.20928291])
    >>> p=patch.Polygon(array([cos(th),sin(th)]).T)
    >>> print p.contains_point((0,0))
    1
    >>> print matplotlib.nxutils.pnpoly(0,0,p.get_path().vertices)
    0

    Thanks!



I can confirm this for both the current development branch and v1.1.x. Strange....

Ben Root

HYPOTHESIS (I have no time to check now everything..., I did my best.)

If radius=None, it is converted into radius=1 in contains_point (in Patch).
(This is the linewidth !)
I am not sure whether it is ok, i.e. in pixels. If this value is considered to be relative to axes, it is enormous!

p.contains_point((0,0),radius=0.01)

gives 0 as it should.

Jerzy Karczmarczuk

P.S. I suggest anyway that reckoner submits a complete program with imports. What is "patch"??


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to