This is my first post to this community.
I have one question about behavior about path.Path.contains_point()
.
from matplotlib.path import Path
# counter clockwise
v1 = [(2,2), (-2,2), (-2,-2), (2,-2), (2,2)]
# clockwise
v2 = [(1,1), (1,-1), (-1,-1), (-1,1), (1,1)]
codes = [Path.MOVETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY]
path = Path(v1+v2, codes+codes)
When I plot this path, like below,
After creating this path,
path.contains_point([0,0])
my expected result is False
, but returns True
.
Is this behavior right?
Plz give me some helpful information