Skip to content

Commit c93cd4c

Browse files
committed
Use consistent style for kwargs in annotation tutorial.
1 parent 3ed6dc4 commit c93cd4c

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

tutorials/text/annotations.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
:func:`~matplotlib.axes.Axes.annotate` method provides helper functionality
1919
to make annotations easy. In an annotation, there are two points to
2020
consider: the location being annotated represented by the argument
21-
``xy`` and the location of the text ``xytext``. Both of these
21+
*xy* and the location of the text *xytext*. Both of these
2222
arguments are ``(x, y)`` tuples.
2323
2424
.. figure:: ../../gallery/pyplots/images/sphx_glr_annotation_basic_001.png
@@ -28,11 +28,11 @@
2828
2929
Annotation Basic
3030
31-
In this example, both the ``xy`` (arrow tip) and ``xytext`` locations
31+
In this example, both the *xy* (arrow tip) and *xytext* locations
3232
(text location) are in data coordinates. There are a variety of other
3333
coordinate systems one can choose -- you can specify the coordinate
34-
system of ``xy`` and ``xytext`` with one of the following strings for
35-
``xycoords`` and ``textcoords`` (default is 'data')
34+
system of *xy* and *xytext* with one of the following strings for
35+
*xycoords* and *textcoords* (default is 'data')
3636
3737
================== ========================================================
3838
argument coordinate system
@@ -60,11 +60,11 @@
6060
6161
Optionally, you can enable drawing of an arrow from the text to the annotated
6262
point by giving a dictionary of arrow properties in the optional keyword
63-
argument ``arrowprops``.
63+
argument *arrowprops*.
6464
6565
6666
==================== =====================================================
67-
``arrowprops`` key description
67+
*arrowprops* key description
6868
==================== =====================================================
6969
width the width of the arrow in points
7070
frac the fraction of the arrow length occupied by the head
@@ -77,12 +77,12 @@
7777
==================== =====================================================
7878
7979
80-
In the example below, the ``xy`` point is in native coordinates
81-
(``xycoords`` defaults to 'data'). For a polar axes, this is in
80+
In the example below, the *xy* point is in native coordinates
81+
(*xycoords* defaults to 'data'). For a polar axes, this is in
8282
(theta, radius) space. The text in this example is placed in the
8383
fractional figure coordinate system. :class:`matplotlib.text.Text`
84-
keyword args like ``horizontalalignment``, ``verticalalignment`` and
85-
``fontsize`` are passed from `~matplotlib.axes.Axes.annotate` to the
84+
keyword arguments like *horizontalalignment*, *verticalalignment* and
85+
*fontsize* are passed from `~matplotlib.axes.Axes.annotate` to the
8686
``Text`` instance.
8787
8888
.. figure:: ../../gallery/pyplots/images/sphx_glr_annotation_polar_001.png
@@ -120,7 +120,7 @@
120120
121121
122122
The :func:`~matplotlib.pyplot.text` function in the pyplot module (or
123-
`~.axes.Axes.text` method of the Axes class) takes bbox keyword argument, and
123+
`~.axes.Axes.text` method of the Axes class) takes *bbox* keyword argument, and
124124
when given, a box around the text is drawn. ::
125125
126126
bbox_props = dict(boxstyle="rarrow,pad=0.3", fc="cyan", ec="b", lw=2)
@@ -184,14 +184,14 @@
184184
xytext=(x2, y2), textcoords='offset points',
185185
)
186186
187-
This annotates a point at ``xy`` in the given coordinate (``xycoords``)
188-
with the text at ``xytext`` given in ``textcoords``. Often, the
187+
This annotates a point at *xy* in the given coordinate (*xycoords*)
188+
with the text at *xytext* given in *textcoords*. Often, the
189189
annotated point is specified in the *data* coordinate and the annotating
190190
text in *offset points*.
191191
See :func:`~matplotlib.pyplot.annotate` for available coordinate systems.
192192
193-
An arrow connecting two points (xy & xytext) can be optionally drawn by
194-
specifying the ``arrowprops`` argument. To draw only an arrow, use
193+
An arrow connecting two points (*xy* & *xytext*) can be optionally drawn by
194+
specifying the *arrowprops* argument. To draw only an arrow, use
195195
empty string as the first argument. ::
196196
197197
ax.annotate("",
@@ -444,8 +444,8 @@
444444
xytext=(0.5, 0.5), textcoords=ax2.transData,
445445
arrowprops=dict(arrowstyle="->"))
446446
447-
2. :class:`~matplotlib.artist.Artist` instance. The xy value (or
448-
xytext) is interpreted as a fractional coordinate of the bbox
447+
2. :class:`~matplotlib.artist.Artist` instance. The *xy* value (or
448+
*xytext*) is interpreted as a fractional coordinate of the bbox
449449
(return value of *get_window_extent*) of the artist. ::
450450
451451
an1 = ax.annotate("Test 1", xy=(0.5, 0.5), xycoords="data",
@@ -526,8 +526,8 @@
526526
axesA=ax1, axesB=ax2)
527527
ax2.add_artist(con)
528528
529-
The above code connects point xy in the data coordinates of ``ax1`` to
530-
point xy in the data coordinates of ``ax2``. Here is a simple example.
529+
The above code connects point *xy* in the data coordinates of ``ax1`` to
530+
point *xy* in the data coordinates of ``ax2``. Here is a simple example.
531531
532532
.. figure:: ../../gallery/userdemo/images/sphx_glr_connect_simple01_001.png
533533
:target: ../../gallery/userdemo/connect_simple01.html

0 commit comments

Comments
 (0)