Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 247689d commit c154674Copy full SHA for c154674
1 file changed
lib/matplotlib/spines.py
@@ -324,7 +324,10 @@ def _calc_offset_transform(self):
324
mtransforms.IdentityTransform())
325
elif position_type == 'data':
326
if self.spine_type in ('right', 'top'):
327
- amount -= 1 # translate left by one to account for right/top data offset of one
+ # The right and top spines have a default position of 1 in
328
+ # axes coordinates. When specifying the position in data
329
+ # coordinates, we need to calculate the position relative to 0.
330
+ amount -= 1
331
if self.spine_type in ('left', 'right'):
332
self._spine_transform = ('data',
333
mtransforms.Affine2D().translate(
0 commit comments