Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibiility with matplotlib 1.1 #49

Merged
merged 1 commit into from
Jan 7, 2015

Conversation

keflavich
Copy link
Contributor

Currently the following failure happens:

xmin = -0.5, xmax = 0.5, ymin = -0.5, ymax = 0.5
x = [0.99950000000000006, 0.99950000000000006, 1.0004999999999999, 1.0004999999999999]
y = [-0.69999999999999996, -0.29999999999999999, -0.29999999999999999, -0.69999999999999996]
    def square_polygon_intersection(xmin, xmax, ymin, ymax, x, y):
        poly = Path(list(zip(x, y)))
        box = Bbox([[xmin, ymin], [xmax, ymax]])
        try:
>           clipped_poly = poly.clip_to_bbox(box)
E           AttributeError: 'Path' object has no attribute 'clip_to_bbox'
pvextractor/geometry/polygon.py:17: AttributeError

Alternatively, we could simply require a recent enough version of Matplotlib.

@keflavich
Copy link
Contributor

@astrofrog - I picked the simpler solution. 1.1 is pretty old.

keflavich added a commit that referenced this pull request Jan 7, 2015
Fix compatibiility with matplotlib 1.1
@keflavich keflavich merged commit bc04a45 into radio-astro-tools:master Jan 7, 2015
@keflavich keflavich deleted the issue49 branch January 7, 2015 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant