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

BUGFIX: contour.py - add_label_near() #2806

Closed
wants to merge 1 commit into from
Closed

Conversation

miili
Copy link

@miili miili commented Feb 13, 2014

transform.inverted().transform([]) evoked an IndexError error:

/usr/local/lib/python2.7/dist-packages/matplotlib/transforms.pyc in transform_non_affine(self, points)
   2002             x_points = x.transform_non_affine(points)[:, 0:1]
   2003         else:
-> 2004             x_points = x.transform_non_affine(points[:, 0])
   2005             x_points = x_points.reshape((len(x_points), 1))
   2006 

IndexError: too many indices

calling transform_point() fixes the intended inverted transformation

this fixes the transformation call
@WeatherGod
Copy link
Member

The fix looks good. It would be nice to get a test added to exercise this function.

@tacaswell
Copy link
Member

github linking magic: #2475

bwkeller added a commit to bwkeller/matplotlib that referenced this pull request Feb 13, 2014
@tacaswell tacaswell added this to the v1.4.x milestone Feb 19, 2014
tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull request Feb 21, 2014
… manually

produce ugly spikes in the contours.  The problem was that screen
coordinates were being passed as data coordinates when the contour was
split to add room for the label.

Incorporate my fix and miili's matplotlib#2806 change
@tacaswell tacaswell modified the milestones: v1.3.x, v1.4.0 Feb 25, 2014
@tacaswell
Copy link
Member

Closing in favor of #2843

@miili Sorry your name has dropped out of the commit logs

@tacaswell tacaswell closed this Feb 26, 2014
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.

None yet

3 participants