@@ -683,23 +683,23 @@ def get_xaxis_transform(self, which='grid'):
683683
684684 def get_xaxis_text1_transform (self , pad_points ):
685685 """
686- Get the transformation used for drawing x-axis labels, which
687- will add the given amount of padding (in points) between the
688- axes and the label. The x-direction is in data coordinates
689- and the y-direction is in axis coordinates. Returns a
690- 3-tuple of the form::
691-
692- (transform, valign, halign)
693-
694- where *valign* and *halign* are requested alignments for the
695- text.
696-
697- .. note::
686+ Returns
687+ -------
688+ transform : Transform
689+ The transform used for drawing x-axis labels, which will add
690+ *pad_points* of padding (in points) between the axes and the label.
691+ The x-direction is in data coordinates and the y-direction is in
692+ axis corrdinates
693+ valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
694+ The text vertical alignment.
695+ halign : {'center', 'left', 'right'}
696+ The text horizontal alignment.
698697
699- This transformation is primarily used by the
700- `~matplotlib.axis.Axis` class, and is meant to be
701- overridden by new kinds of projections that may need to
702- place axis elements in different locations.
698+ Notes
699+ -----
700+ This transformation is primarily used by the `~matplotlib.axis.Axis`
701+ class, and is meant to be overridden by new kinds of projections that
702+ may need to place axis elements in different locations.
703703 """
704704 labels_align = rcParams ["xtick.alignment" ]
705705 return (self .get_xaxis_transform (which = 'tick1' ) +
@@ -709,23 +709,23 @@ def get_xaxis_text1_transform(self, pad_points):
709709
710710 def get_xaxis_text2_transform (self , pad_points ):
711711 """
712- Get the transformation used for drawing the secondary x-axis
713- labels, which will add the given amount of padding (in points)
714- between the axes and the label. The x-direction is in data
715- coordinates and the y-direction is in axis coordinates.
716- Returns a 3-tuple of the form::
717-
718- (transform, valign, halign)
719-
720- where *valign* and *halign* are requested alignments for the
721- text.
722-
723- .. note::
712+ Returns
713+ -------
714+ transform : Transform
715+ The transform used for drawing secondary x-axis labels, which will
716+ add *pad_points* of padding (in points) between the axes and the
717+ label. The x-direction is in data coordinates and the y-direction
718+ is in axis corrdinates
719+ valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
720+ The text vertical alignment.
721+ halign : {'center', 'left', 'right'}
722+ The text horizontal alignment.
724723
725- This transformation is primarily used by the
726- `~matplotlib.axis.Axis` class, and is meant to be
727- overridden by new kinds of projections that may need to
728- place axis elements in different locations.
724+ Notes
725+ -----
726+ This transformation is primarily used by the `~matplotlib.axis.Axis`
727+ class, and is meant to be overridden by new kinds of projections that
728+ may need to place axis elements in different locations.
729729 """
730730 labels_align = rcParams ["xtick.alignment" ]
731731 return (self .get_xaxis_transform (which = 'tick2' ) +
@@ -759,23 +759,23 @@ def get_yaxis_transform(self, which='grid'):
759759
760760 def get_yaxis_text1_transform (self , pad_points ):
761761 """
762- Get the transformation used for drawing y-axis labels, which
763- will add the given amount of padding (in points) between the
764- axes and the label. The x-direction is in axis coordinates
765- and the y-direction is in data coordinates. Returns a 3-tuple
766- of the form::
767-
768- (transform, valign, halign)
769-
770- where *valign* and *halign* are requested alignments for the
771- text.
772-
773- .. note::
762+ Returns
763+ -------
764+ transform : Transform
765+ The transform used for drawing y-axis labels, which will add
766+ *pad_points* of padding (in points) between the axes and the label.
767+ The x-direction is in axis coordinates and the y-direction is in
768+ data corrdinates
769+ valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
770+ The text vertical alignment.
771+ halign : {'center', 'left', 'right'}
772+ The text horizontal alignment.
774773
775- This transformation is primarily used by the
776- `~matplotlib.axis.Axis` class, and is meant to be
777- overridden by new kinds of projections that may need to
778- place axis elements in different locations.
774+ Notes
775+ -----
776+ This transformation is primarily used by the `~matplotlib.axis.Axis`
777+ class, and is meant to be overridden by new kinds of projections that
778+ may need to place axis elements in different locations.
779779 """
780780 labels_align = rcParams ["ytick.alignment" ]
781781 return (self .get_yaxis_transform (which = 'tick1' ) +
@@ -785,23 +785,23 @@ def get_yaxis_text1_transform(self, pad_points):
785785
786786 def get_yaxis_text2_transform (self , pad_points ):
787787 """
788- Get the transformation used for drawing the secondary y-axis
789- labels, which will add the given amount of padding (in points)
790- between the axes and the label. The x-direction is in axis
791- coordinates and the y-direction is in data coordinates.
792- Returns a 3-tuple of the form::
793-
794- (transform, valign, halign)
795-
796- where *valign* and *halign* are requested alignments for the
797- text.
798-
799- .. note::
788+ Returns
789+ -------
790+ transform : Transform
791+ The transform used for drawing secondart y-axis labels, which will
792+ add *pad_points* of padding (in points) between the axes and the
793+ label. The x-direction is in axis coordinates and the y-direction
794+ is in data corrdinates
795+ valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
796+ The text vertical alignment.
797+ halign : {'center', 'left', 'right'}
798+ The text horizontal alignment.
800799
801- This transformation is primarily used by the
802- `~matplotlib.axis.Axis` class, and is meant to be
803- overridden by new kinds of projections that may need to
804- place axis elements in different locations.
800+ Notes
801+ -----
802+ This transformation is primarily used by the `~matplotlib.axis.Axis`
803+ class, and is meant to be overridden by new kinds of projections that
804+ may need to place axis elements in different locations.
805805 """
806806 labels_align = rcParams ["ytick.alignment" ]
807807 return (self .get_yaxis_transform (which = 'tick2' ) +
@@ -924,33 +924,35 @@ def _set_artist_props(self, a):
924924
925925 def _gen_axes_patch (self ):
926926 """
927- Returns the patch used to draw the background of the axes. It
928- is also used as the clipping path for any data elements on the
929- axes.
930-
931- In the standard axes, this is a rectangle, but in other
932- projections it may not be.
933-
934- .. note::
927+ Returns
928+ -------
929+ Patch
930+ The patch used to draw the background of the axes. It is also used
931+ as the clipping path for any data elements on the axes.
935932
936- Intended to be overridden by new projection types.
933+ In the standard axes, this is a rectangle, but in other projections
934+ it may not be.
937935
936+ Notes
937+ -----
938+ Intended to be overridden by new projection types.
938939 """
939940 return mpatches .Rectangle ((0.0 , 0.0 ), 1.0 , 1.0 )
940941
941942 def _gen_axes_spines (self , locations = None , offset = 0.0 , units = 'inches' ):
942943 """
943- Returns a dict whose keys are spine names and values are
944- Line2D or Patch instances. Each element is used to draw a
945- spine of the axes.
946-
947- In the standard axes, this is a single line segment, but in
948- other projections it may not be.
944+ Returns
945+ -------
946+ dict
947+ Mapping of spine names to `Line2D` or `Patch` instances that are
948+ used to draw axes spines.
949949
950- .. note::
951-
952- Intended to be overridden by new projection types.
950+ In the standard axes, spines are single line segments, but in other
951+ projections they may not be.
953952
953+ Notes
954+ -----
955+ Intended to be overridden by new projection types.
954956 """
955957 return OrderedDict ((side , mspines .Spine .linear_spine (self , side ))
956958 for side in ['left' , 'right' , 'bottom' , 'top' ])
@@ -1411,10 +1413,11 @@ def set_anchor(self, anchor, share=False):
14111413
14121414 def get_data_ratio (self ):
14131415 """
1414- Returns the aspect ratio of the raw data.
1416+ Return the aspect ratio of the raw data.
14151417
1416- This method is intended to be overridden by new projection
1417- types.
1418+ Notes
1419+ -----
1420+ This method is intended to be overridden by new projection types.
14181421 """
14191422 xmin , xmax = self .get_xbound ()
14201423 ymin , ymax = self .get_ybound ()
@@ -1426,8 +1429,11 @@ def get_data_ratio(self):
14261429
14271430 def get_data_ratio_log (self ):
14281431 """
1429- Returns the aspect ratio of the raw data in log scale.
1430- Will be used when both axis scales are in log.
1432+ Return the aspect ratio of the raw data in log scale.
1433+
1434+ Notes
1435+ -----
1436+ Will be used when both axis are in log scale.
14311437 """
14321438 xmin , xmax = self .get_xbound ()
14331439 ymin , ymax = self .get_ybound ()
@@ -4251,7 +4257,7 @@ def contains(self, mouseevent):
42514257
42524258 def contains_point (self , point ):
42534259 """
4254- Returns whether *point* (pair of pixel coordinates) is inside the axes
4260+ Return whether *point* (pair of pixel coordinates) is inside the axes
42554261 patch.
42564262 """
42574263 return self .patch .contains_point (point , radius = 1.0 )
0 commit comments