path polygon direction?


It has been reported in but I do not see anything has happened after this.

Following code illustrates the problem, when polygon defined in one direction, I can check if point is inside it, if other direction, I can not.

from matplotlib.patches import Polygon




I do not see an obvious reason why polygons should be defined in one direction only.

I have tried the code with several versions of matplotlib, newest is 1.3.1 with numpy 1.8 and python 3.2.3 and all newer versions do not work as I would accept them. Only the oldest version, python2.6.6 with matplotlib gives me correct answer.

I have digged in the source code and ended up in file _path.cpp where the function point_in_path_impl seems to do the actual job, but understanding it completely seems to take more time than I have at the moment.

Any feedback appreciated.