43
43
# The axes module contains all the wrappers to plotting functions.
44
44
# All the other methods should go in the _AxesBase class.
45
45
46
- class Axes (_AxesBase ):
46
+ class Axes (_AxesBase , _lines . LinesAndSpans ):
47
47
"""
48
48
The :class:`Axes` contains most of the figure elements:
49
49
:class:`~matplotlib.axis.Axis`, :class:`~matplotlib.axis.Tick`,
@@ -57,6 +57,7 @@ class Axes(_AxesBase):
57
57
'ylim_changed' and the callback will be called with func(*ax*)
58
58
where *ax* is the :class:`Axes` instance.
59
59
"""
60
+
60
61
### Labelling, legend and texts
61
62
62
63
def get_title (self , loc = "center" ):
@@ -590,35 +591,6 @@ def annotate(self, *args, **kwargs):
590
591
a ._remove_method = lambda h : self .texts .remove (h )
591
592
return a
592
593
593
- #### Lines and spans
594
-
595
- def axhline (self , y = 0 , xmin = 0 , xmax = 1 , ** kwargs ):
596
- return _lines .axhline (self , y = 0 , xmin = 0 , xmax = 1 , ** kwargs )
597
- axhline .__doc__ = _lines .axhline .__doc__
598
-
599
- def axvline (self , x = 0 , ymin = 0 , ymax = 1 , ** kwargs ):
600
- return _lines .axvline (self , x = 0 , ymin = 0 , ymax = 1 , ** kwargs )
601
- axvline .__doc__ = _lines .axvline .__doc__
602
-
603
- def axhspan (self , ymin , ymax , xmin = 0 , xmax = 1 , ** kwargs ):
604
- return _lines .axhspan (self , ymin , ymax , xmin = 0 , xmax = 1 , ** kwargs )
605
- axhspan .__doc__ = _lines .axhspan .__doc__
606
-
607
- def axvspan (self , xmin , xmax , ymin = 0 , ymax = 1 , ** kwargs ):
608
- return _lines .axvspan (self , xmin , xmax , ymin = 0 , ymax = 1 , ** kwargs )
609
- axvspan .__doc__ = _lines .axvspan .__doc__
610
-
611
- def hlines (self , y , xmin , xmax , colors = 'k' , linestyles = 'solid' ,
612
- label = '' , ** kwargs ):
613
- return _lines .hlines (self , y , xmin , xmax , colors = 'k' ,
614
- linestyles = 'solid' , label = '' , ** kwargs )
615
- hlines .__doc__ = _lines .hlines .__doc__
616
-
617
- def vlines (self , x , ymin , ymax , colors = 'k' , linestyles = 'solid' ,
618
- label = '' , ** kwargs ):
619
- return _lines .vlines .__doc__
620
- vlines .__doc__ = _lines .vlines .__doc__
621
-
622
594
@docstring .dedent_interpd
623
595
def eventplot (self , positions , orientation = 'horizontal' , lineoffsets = 1 ,
624
596
linelengths = 1 , linewidths = None , colors = None ,
0 commit comments