Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 11149df

Browse files
committed
spines: be clear about meaning of location vertices
svn path=/trunk/matplotlib/; revision=8045
1 parent 00cfd28 commit 11149df

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/matplotlib/spines.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,15 @@ def linear_spine(cls, axes, spine_type, **kwargs):
297297
"""
298298
(staticmethod) Returns a linear :class:`Spine`.
299299
"""
300+
# all values of 13 get replaced upon call to set_bounds()
300301
if spine_type=='left':
301-
path = mpath.Path([(0.0, 0.0), (0.0, 1.0)])
302+
path = mpath.Path([(0.0, 13), (0.0, 13)])
302303
elif spine_type=='right':
303-
path = mpath.Path([(1.0, 0.0), (1.0, 1.0)])
304+
path = mpath.Path([(1.0, 13), (1.0, 13)])
304305
elif spine_type=='bottom':
305-
path = mpath.Path([(0.0, 0.0), (1.0, 0.0)])
306+
path = mpath.Path([(13, 0.0), (13, 0.0)])
306307
elif spine_type=='top':
307-
path = mpath.Path([(0.0, 1.0), (1.0, 1.0)])
308+
path = mpath.Path([(13, 1.0), (13, 1.0)])
308309
else:
309310
raise ValueError('unable to make path for spine "%s"'%spine_type)
310311
result = cls(axes,spine_type,path,**kwargs)

0 commit comments

Comments
 (0)