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