@@ -560,16 +560,17 @@ def text(self, x, y, s, fontdict=None, withdash=False, **kwargs):
560
560
"""
561
561
Add text to the axes.
562
562
563
- Add text in string `s` to axis at location `x`, `y`, data
564
- coordinates.
563
+ Add the text *s* to the axes at location *x*, *y* in data coordinates.
565
564
566
565
Parameters
567
566
----------
568
567
x, y : scalars
569
- data coordinates
568
+ The position to place the text. By default, this is in data
569
+ coordinates. The coordinate system can be changed using the
570
+ *transform* parameter.
570
571
571
- s : string
572
- text
572
+ s : str
573
+ The text.
573
574
574
575
fontdict : dictionary, optional, default: None
575
576
A dictionary to override the default text properties. If fontdict
@@ -579,6 +580,11 @@ def text(self, x, y, s, fontdict=None, withdash=False, **kwargs):
579
580
Creates a `~matplotlib.text.TextWithDash` instance instead of a
580
581
`~matplotlib.text.Text` instance.
581
582
583
+ Returns
584
+ -------
585
+ text : `.Text`
586
+ The created `.Text` instance.
587
+
582
588
Other Parameters
583
589
----------------
584
590
**kwargs : `~matplotlib.text.Text` properties.
@@ -596,9 +602,8 @@ def text(self, x, y, s, fontdict=None, withdash=False, **kwargs):
596
602
lower-left and 1,1 is upper-right). The example below places
597
603
text in the center of the axes::
598
604
599
- >>> text(0.5, 0.5,'matplotlib', horizontalalignment='center',
600
- ... verticalalignment='center',
601
- ... transform=ax.transAxes)
605
+ >>> text(0.5, 0.5, 'matplotlib', horizontalalignment='center',
606
+ ... verticalalignment='center', transform=ax.transAxes)
602
607
603
608
You can put a rectangular box around the text instance (e.g., to
604
609
set a background color) by using the keyword `bbox`. `bbox` is
@@ -678,13 +683,8 @@ def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
678
683
679
684
See also
680
685
--------
681
- hlines : add horizontal lines in data coordinates
682
- axhspan : add a horizontal span (rectangle) across the axis
683
-
684
- Notes
685
- -----
686
- kwargs are passed to :class:`~matplotlib.lines.Line2D` and can be used
687
- to control the line properties.
686
+ hlines : Add horizontal lines in data coordinates.
687
+ axhspan : Add a horizontal span (rectangle) across the axis.
688
688
689
689
Examples
690
690
--------
@@ -768,8 +768,8 @@ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
768
768
769
769
See also
770
770
--------
771
- vlines : add vertical lines in data coordinates
772
- axvspan : add a vertical span (rectangle) across the axis
771
+ vlines : Add vertical lines in data coordinates.
772
+ axvspan : Add a vertical span (rectangle) across the axis.
773
773
"""
774
774
775
775
if "transform" in kwargs :
@@ -828,7 +828,7 @@ def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
828
828
829
829
See Also
830
830
--------
831
- axvspan : add a vertical span across the axes
831
+ axvspan : Add a vertical span across the axes.
832
832
"""
833
833
trans = self .get_yaxis_transform (which = 'grid' )
834
834
@@ -885,7 +885,7 @@ def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs):
885
885
886
886
See Also
887
887
--------
888
- axhspan : add a horizontal span across the axes
888
+ axhspan : Add a horizontal span across the axes.
889
889
890
890
Examples
891
891
--------
@@ -3526,6 +3526,10 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3526
3526
3527
3527
- ``means``: points or lines representing the means.
3528
3528
3529
+ Notes
3530
+ -----
3531
+ .. [Notes section required for data comment. See #10189.]
3532
+
3529
3533
"""
3530
3534
3531
3535
# If defined in matplotlibrc, apply the value from rc file
@@ -4783,41 +4787,38 @@ def arrow(self, x, y, dx, dy, **kwargs):
4783
4787
"""
4784
4788
Add an arrow to the axes.
4785
4789
4786
- Draws arrow on specified axis from (`x`, `y`) to (`x` + `dx`,
4787
- `y` + `dy`). Uses FancyArrow patch to construct the arrow.
4790
+ This draws an arrow from ``(x, y)`` to ``(x+dx, y+dy)``.
4788
4791
4789
4792
Parameters
4790
4793
----------
4791
- x : float
4792
- X-coordinate of the arrow base
4793
- y : float
4794
- Y-coordinate of the arrow base
4795
- dx : float
4796
- Length of arrow along x-coordinate
4797
- dy : float
4798
- Length of arrow along y-coordinate
4794
+ x, y : float
4795
+ The x/y-coordinate of the arrow base.
4796
+ dx, dy : float
4797
+ The length of the arrow along x/y-direction.
4799
4798
4800
4799
Returns
4801
4800
-------
4802
- a : FancyArrow
4803
- patches .FancyArrow object
4801
+ arrow : `. FancyArrow`
4802
+ The created ` .FancyArrow` object.
4804
4803
4805
4804
Other Parameters
4806
- -----------------
4807
- Optional kwargs (inherited from FancyArrow patch) control the arrow
4808
- construction and properties:
4805
+ ----------------
4806
+ **kwargs
4807
+ Optional kwargs (inherited from `.FancyArrow` patch) control the
4808
+ arrow construction and properties:
4809
4809
4810
4810
%(FancyArrow)s
4811
4811
4812
4812
Notes
4813
4813
-----
4814
4814
The resulting arrow is affected by the axes aspect ratio and limits.
4815
4815
This may produce an arrow whose head is not square with its stem. To
4816
- create an arrow whose head is square with its stem, use
4817
- :meth:`annotate` for example::
4816
+ create an arrow whose head is square with its stem,
4817
+ use :meth:`annotate` for example:
4818
+
4819
+ >>> ax.annotate("", xy=(0.5, 0.5), xytext=(0, 0),
4820
+ ... arrowprops=dict(arrowstyle="->"))
4818
4821
4819
- ax.annotate("", xy=(0.5, 0.5), xytext=(0, 0),
4820
- arrowprops=dict(arrowstyle="->"))
4821
4822
"""
4822
4823
# Strip away units for the underlying patch since units
4823
4824
# do not make sense to most patch-like code
@@ -6183,7 +6184,7 @@ def table(self, **kwargs):
6183
6184
cellLoc='right', colWidths=None,
6184
6185
rowLabels=None, rowColours=None, rowLoc='left',
6185
6186
colLabels=None, colColours=None, colLoc='center',
6186
- loc='bottom', bbox=None):
6187
+ loc='bottom', bbox=None)
6187
6188
6188
6189
Returns a :class:`matplotlib.table.Table` instance. Either `cellText`
6189
6190
or `cellColours` must be provided. For finer grained control over
0 commit comments