Skip to content

Commit 771592d

Browse files
committed
Simplify skew example.
1 parent 63e0993 commit 771592d

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

examples/api/skewt.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,6 @@ def get_view_interval(self):
6767
# upper X-axis and draw the spine there. It also provides this range
6868
# to the X-axis artist for ticking and gridlines
6969
class SkewSpine(mspines.Spine):
70-
def __init__(self, axes, spine_type):
71-
if spine_type == 'bottom':
72-
loc = 0.0
73-
else:
74-
loc = 1.0
75-
mspines.Spine.__init__(self, axes, spine_type,
76-
mpath.Path([(13, loc), (13, loc)]))
77-
7870
def _adjust_location(self):
7971
trans = self.axes.transDataToAxes.inverted()
8072
if self.spine_type == 'top':
@@ -109,7 +101,7 @@ def _init_axis(self):
109101
self.spines['right'].register_axis(self.yaxis)
110102

111103
def _gen_axes_spines(self):
112-
spines = {'top':SkewSpine(self, 'top'),
104+
spines = {'top':SkewSpine.linear_spine(self, 'top'),
113105
'bottom':mspines.Spine.linear_spine(self, 'bottom'),
114106
'left':mspines.Spine.linear_spine(self, 'left'),
115107
'right':mspines.Spine.linear_spine(self, 'right')}

0 commit comments

Comments
 (0)