Fixes issue #1960. Account for right/top spine data offset on transform ...#1964
Conversation
…on transform when doing spine.set_position(). Also includes a testcase for the data locations.
lib/matplotlib/spines.py
Outdated
There was a problem hiding this comment.
Sorry, the comment doesn't enlighten me. Do you know the root cause of this workaround? Is this one pixel? Are you certain that this isn't a snapping issue?
Apologies for the (possibly silly) questions - I would like to understand the underlying need for this change.
There was a problem hiding this comment.
It's not one pixel -- it's in axes units which are (0, 1) across the entire axis. Maybe a better comment would be:
The right and top spines have a default position of 1 in axes coordinates. When specifying the position in data coordinates, we need to calculate the position relative to 0.
There was a problem hiding this comment.
That is correct. I updated the code with Michael's suggested comment. Thanks @mdboom
|
Just needs an Nice work @cimarronm. 👍 |
|
How about: Let me know if that is good or want to improve the wording for |
That sounds good to me. The |
|
Is this good to merge? |
…_fix Fixes issue #1960. Account for right/top spine data offset on transform ...
...when doing spine.set_position(). Also includes a testcase for the data locations.