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

Skip to content

Commit 8a60905

Browse files
committed
Use predictable order for spines
1 parent 502b1be commit 8a60905

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from matplotlib.externals import six
55
from matplotlib.externals.six.moves import xrange
66

7+
from collections import OrderedDict
78
import itertools
89
import warnings
910
import math
@@ -896,11 +897,11 @@ def _gen_axes_spines(self, locations=None, offset=0.0, units='inches'):
896897
Intended to be overridden by new projection types.
897898
898899
"""
899-
return {
900-
'left': mspines.Spine.linear_spine(self, 'left'),
901-
'right': mspines.Spine.linear_spine(self, 'right'),
902-
'bottom': mspines.Spine.linear_spine(self, 'bottom'),
903-
'top': mspines.Spine.linear_spine(self, 'top'), }
900+
return OrderedDict([
901+
('left', mspines.Spine.linear_spine(self, 'left')),
902+
('right', mspines.Spine.linear_spine(self, 'right')),
903+
('bottom', mspines.Spine.linear_spine(self, 'bottom')),
904+
('top', mspines.Spine.linear_spine(self, 'top'))])
904905

905906
def cla(self):
906907
"""Clear the current axes."""

0 commit comments

Comments
 (0)