@@ -682,23 +682,23 @@ def get_xaxis_transform(self, which='grid'):
682682
683683 def get_xaxis_text1_transform (self , pad_points ):
684684 """
685- Get the transformation used for drawing x-axis labels, which
686- will add the given amount of padding (in points) between the
687- axes and the label. The x-direction is in data coordinates
688- and the y-direction is in axis coordinates. Returns a
689- 3-tuple of the form::
690-
691- (transform, valign, halign)
692-
693- where *valign* and *halign* are requested alignments for the
694- text.
695-
696- .. note::
685+ Returns
686+ -------
687+ transform : Transform
688+ The transform used for drawing x-axis labels, which will add
689+ *pad_points* of padding (in points) between the axes and the label.
690+ The x-direction is in data coordinates and the y-direction is in
691+ axis corrdinates
692+ valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
693+ The text vertical alignment.
694+ halign : {'center', 'left', 'right'}
695+ The text horizontal alignment.
697696
698- This transformation is primarily used by the
699- `~matplotlib.axis.Axis` class, and is meant to be
700- overridden by new kinds of projections that may need to
701- place axis elements in different locations.
697+ Notes
698+ -----
699+ This transformation is primarily used by the `~matplotlib.axis.Axis`
700+ class, and is meant to be overridden by new kinds of projections that
701+ may need to place axis elements in different locations.
702702 """
703703 labels_align = rcParams ["xtick.alignment" ]
704704 return (self .get_xaxis_transform (which = 'tick1' ) +
@@ -708,23 +708,23 @@ def get_xaxis_text1_transform(self, pad_points):
708708
709709 def get_xaxis_text2_transform (self , pad_points ):
710710 """
711- Get the transformation used for drawing the secondary x-axis
712- labels, which will add the given amount of padding (in points)
713- between the axes and the label. The x-direction is in data
714- coordinates and the y-direction is in axis coordinates.
715- Returns a 3-tuple of the form::
716-
717- (transform, valign, halign)
718-
719- where *valign* and *halign* are requested alignments for the
720- text.
721-
722- .. note::
711+ Returns
712+ -------
713+ transform : Transform
714+ The transform used for drawing secondary x-axis labels, which will
715+ add *pad_points* of padding (in points) between the axes and the
716+ label. The x-direction is in data coordinates and the y-direction
717+ is in axis corrdinates
718+ valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
719+ The text vertical alignment.
720+ halign : {'center', 'left', 'right'}
721+ The text horizontal alignment.
723722
724- This transformation is primarily used by the
725- `~matplotlib.axis.Axis` class, and is meant to be
726- overridden by new kinds of projections that may need to
727- place axis elements in different locations.
723+ Notes
724+ -----
725+ This transformation is primarily used by the `~matplotlib.axis.Axis`
726+ class, and is meant to be overridden by new kinds of projections that
727+ may need to place axis elements in different locations.
728728 """
729729 labels_align = rcParams ["xtick.alignment" ]
730730 return (self .get_xaxis_transform (which = 'tick2' ) +
@@ -758,23 +758,23 @@ def get_yaxis_transform(self, which='grid'):
758758
759759 def get_yaxis_text1_transform (self , pad_points ):
760760 """
761- Get the transformation used for drawing y-axis labels, which
762- will add the given amount of padding (in points) between the
763- axes and the label. The x-direction is in axis coordinates
764- and the y-direction is in data coordinates. Returns a 3-tuple
765- of the form::
766-
767- (transform, valign, halign)
768-
769- where *valign* and *halign* are requested alignments for the
770- text.
771-
772- .. note::
761+ Returns
762+ -------
763+ transform : Transform
764+ The transform used for drawing y-axis labels, which will add
765+ *pad_points* of padding (in points) between the axes and the label.
766+ The x-direction is in axis coordinates and the y-direction is in
767+ data corrdinates
768+ valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
769+ The text vertical alignment.
770+ halign : {'center', 'left', 'right'}
771+ The text horizontal alignment.
773772
774- This transformation is primarily used by the
775- `~matplotlib.axis.Axis` class, and is meant to be
776- overridden by new kinds of projections that may need to
777- place axis elements in different locations.
773+ Notes
774+ -----
775+ This transformation is primarily used by the `~matplotlib.axis.Axis`
776+ class, and is meant to be overridden by new kinds of projections that
777+ may need to place axis elements in different locations.
778778 """
779779 labels_align = rcParams ["ytick.alignment" ]
780780 return (self .get_yaxis_transform (which = 'tick1' ) +
@@ -784,23 +784,23 @@ def get_yaxis_text1_transform(self, pad_points):
784784
785785 def get_yaxis_text2_transform (self , pad_points ):
786786 """
787- Get the transformation used for drawing the secondary y-axis
788- labels, which will add the given amount of padding (in points)
789- between the axes and the label. The x-direction is in axis
790- coordinates and the y-direction is in data coordinates.
791- Returns a 3-tuple of the form::
792-
793- (transform, valign, halign)
794-
795- where *valign* and *halign* are requested alignments for the
796- text.
797-
798- .. note::
787+ Returns
788+ -------
789+ transform : Transform
790+ The transform used for drawing secondart y-axis labels, which will
791+ add *pad_points* of padding (in points) between the axes and the
792+ label. The x-direction is in axis coordinates and the y-direction
793+ is in data corrdinates
794+ valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
795+ The text vertical alignment.
796+ halign : {'center', 'left', 'right'}
797+ The text horizontal alignment.
799798
800- This transformation is primarily used by the
801- `~matplotlib.axis.Axis` class, and is meant to be
802- overridden by new kinds of projections that may need to
803- place axis elements in different locations.
799+ Notes
800+ -----
801+ This transformation is primarily used by the `~matplotlib.axis.Axis`
802+ class, and is meant to be overridden by new kinds of projections that
803+ may need to place axis elements in different locations.
804804 """
805805 labels_align = rcParams ["ytick.alignment" ]
806806 return (self .get_yaxis_transform (which = 'tick2' ) +
@@ -923,33 +923,35 @@ def _set_artist_props(self, a):
923923
924924 def _gen_axes_patch (self ):
925925 """
926- Returns the patch used to draw the background of the axes. It
927- is also used as the clipping path for any data elements on the
928- axes.
929-
930- In the standard axes, this is a rectangle, but in other
931- projections it may not be.
932-
933- .. note::
926+ Returns
927+ -------
928+ Patch
929+ The patch used to draw the background of the axes. It is also used
930+ as the clipping path for any data elements on the axes.
934931
935- Intended to be overridden by new projection types.
932+ In the standard axes, this is a rectangle, but in other projections
933+ it may not be.
936934
935+ Notes
936+ -----
937+ Intended to be overridden by new projection types.
937938 """
938939 return mpatches .Rectangle ((0.0 , 0.0 ), 1.0 , 1.0 )
939940
940941 def _gen_axes_spines (self , locations = None , offset = 0.0 , units = 'inches' ):
941942 """
942- Returns a dict whose keys are spine names and values are
943- Line2D or Patch instances. Each element is used to draw a
944- spine of the axes.
945-
946- In the standard axes, this is a single line segment, but in
947- other projections it may not be.
943+ Returns
944+ -------
945+ dict
946+ Mapping of spine names to `Line2D` or `Patch` instances that are
947+ used to draw axes spines.
948948
949- .. note::
950-
951- Intended to be overridden by new projection types.
949+ In the standard axes, spines are single line segments, but in other
950+ projections they may not be.
952951
952+ Notes
953+ -----
954+ Intended to be overridden by new projection types.
953955 """
954956 return OrderedDict ((side , mspines .Spine .linear_spine (self , side ))
955957 for side in ['left' , 'right' , 'bottom' , 'top' ])
@@ -1410,10 +1412,11 @@ def set_anchor(self, anchor, share=False):
14101412
14111413 def get_data_ratio (self ):
14121414 """
1413- Returns the aspect ratio of the raw data.
1415+ Return the aspect ratio of the raw data.
14141416
1415- This method is intended to be overridden by new projection
1416- types.
1417+ Notes
1418+ -----
1419+ This method is intended to be overridden by new projection types.
14171420 """
14181421 xmin , xmax = self .get_xbound ()
14191422 ymin , ymax = self .get_ybound ()
@@ -1425,8 +1428,11 @@ def get_data_ratio(self):
14251428
14261429 def get_data_ratio_log (self ):
14271430 """
1428- Returns the aspect ratio of the raw data in log scale.
1429- Will be used when both axis scales are in log.
1431+ Return the aspect ratio of the raw data in log scale.
1432+
1433+ Notes
1434+ -----
1435+ Will be used when both axis are in log scale.
14301436 """
14311437 xmin , xmax = self .get_xbound ()
14321438 ymin , ymax = self .get_ybound ()
@@ -4244,7 +4250,7 @@ def contains(self, mouseevent):
42444250
42454251 def contains_point (self , point ):
42464252 """
4247- Returns whether *point* (pair of pixel coordinates) is inside the axes
4253+ Return whether *point* (pair of pixel coordinates) is inside the axes
42484254 patch.
42494255 """
42504256 return self .patch .contains_point (point , radius = 1.0 )
0 commit comments