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 |
lib/matplotlib/legend.py
Outdated
| ax = self.parent | ||
| bboxes = [] | ||
| lines = [] | ||
| vertices = [] |
There was a problem hiding this comment.
Do not need this, it looks like vertices just gets re-assigned below.
|
Other that 1 very minor style point 👍 |
lib/matplotlib/tests/test_legend.py
Outdated
| 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.
I think this line is over 80 characters.
There was a problem hiding this comment.
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.
I am fine putting off fixing pep8 in the tests.
There was a problem hiding this comment.
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.