8000 BUGFIX: This change fixes #2475 by bwkeller · Pull Request #2809 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

BUGFIX: This change fixes #2475 #2809

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

Closed
wants to merge 2 commits into from
Closed

Conversation

bwkeller
Copy link
Contributor

Adding contour labels added 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. xcmin in the add_label_near() method should contain data coordinates, and if transform=False was used (as it does in the BlockingContourLabeler), they were left in screen coordinates, causing the new vertices of the clipped contours to be in the wrong location.

… 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.
@tacaswell
Copy link
Member

This and #2806 need to be sorted out as they both address #2475 in different ways.

@bwkeller
Copy link
Contributor Author

I don't think #2809 actually fixes #2475, since the problem occurs when transform=False is used by BlockingContourLabeler, and #2809's changes are in an if transform: section, so that code won't actually run. I don't think the transform passed as an argument should even be used in that transform, since find_nearest_contour returns pixel co-ordinates when add_label_near calls it. I'm not 100% sure about that part though.

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.

2 participants
0