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
Fixes matplotlib/matplotlib#1235 #6110
Conversation
AppVeyor builds are failing; but I cannot make sense of the logs. Can someone enlighten me? |
See #6115 That is probably unrelated to your work |
@@ -737,6 +737,8 @@ def _auto_legend_data(self): | |||
ax = self.parent | |||
bboxes = [] | |||
lines = [] | |||
vertices = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not need this, it looks like vertices just gets re-assigned below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Other that 1 very minor style point 👍 |
plt.gca().set_ylim(-0.5, 2.2) | ||
|
||
|
||
@image_comparison(baseline_images=['not_covering_scatter_transform'], extensions=['png']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line is over 80 characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I noticed the rest of the test file violates this 😉 Can be amended in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine putting off fixing pep8 in the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually fixed in another PR that I might just give a little nudge to some time...
035b33b
to
da49463
Compare
@tacaswell I rebased against master that has #6116, and seems to work. Unsure what happened here: https://ci.appveyor.com/project/mdboom/matplotlib/build/1.0.985/job/4u3na3cignvxhg2n |
That is a known transient failure. |
backported to v2.x as 869cc9d |
Thanks @tacaswell 👍 |
Credit to @dashed, fixes #1235, supercedes #2857
The problem is that _find_best_position does not receive positions of (transformed) points from _auto_legend_data. We attempted to fix it by adding the offsets of points, after preparing the points and transforming them, and calling legendBox.count_contains on offsets.