@@ -55,9 +55,9 @@ For physical coordinate systems (points or pixels) the origin is the
5555however, the origin is from the (right, top) of the figure or axes,
5656analogous to negative indexing of sequences.
5757
58- Optionally, you can specify arrow properties for adding an arrow
59- from the text to the annotated point by giving a dictionary of arrow
60- properties in the optional keyword argument ``arrowprops ``.
58+ Optionally, you can enable drawing of an arrow from the text to the annotated
59+ point by giving a dictionary of arrow properties in the optional keyword
60+ argument ``arrowprops ``.
6161
6262
6363==================== =====================================================
@@ -90,9 +90,8 @@ annotations, including fancy arrows, see :ref:`plotting-guide-annotation`
9090and :ref: `pylab_examples-annotation_demo `.
9191
9292
93- Do not proceed unless you already have read :ref: `annotations-tutorial `,
94- :func: `~matplotlib.pyplot.text ` and
95- :func: `~matplotlib.pyplot.annotate `!
93+ Do not proceed unless you have already read :ref: `annotations-tutorial `,
94+ :func: `~matplotlib.pyplot.text ` and :func: `~matplotlib.pyplot.annotate `!
9695
9796
9897.. _plotting-guide-annotation :
@@ -125,7 +124,7 @@ The patch object associated with the text can be accessed by::
125124
126125The return value is an instance of FancyBboxPatch and the patch
127126properties like facecolor, edgewidth, etc. can be accessed and
128- modified as usual. To change the shape of the box, use *set_boxstyle *
127+ modified as usual. To change the shape of the box, use the *set_boxstyle *
129128method. ::
130129
131130 bb.set_boxstyle("rarrow", pad=0.6)
@@ -150,7 +149,7 @@ keyword arguments. Currently, following box styles are implemented.
150149.. plot :: mpl_examples/pylab_examples/fancybox_demo2.py
151150
152151
153- Note that the attributes arguments can be specified within the style
152+ Note that the attribute arguments can be specified within the style
154153name with separating comma (this form can be used as "boxstyle" value
155154of bbox argument when initializing the text instance) ::
156155
@@ -177,7 +176,7 @@ annotated point is specified in the *data* coordinate and the annotating
177176text in *offset points *.
178177See :func: `~matplotlib.pyplot.annotate ` for available coordinate systems.
179178
180- An arrow connecting two point (xy & xytext) can be optionally drawn by
179+ An arrow connecting two points (xy & xytext) can be optionally drawn by
181180specifying the ``arrowprops `` argument. To draw only an arrow, use
182181empty string as the first argument. ::
183182
@@ -198,7 +197,7 @@ The arrow drawing takes a few steps.
1981972. If patch object is given (*patchA * & *patchB *), the path is clipped to
199198 avoid the patch.
200199
201- 3. The path is further shrunk by given amount of pixels (*shirnkA *
200+ 3. The path is further shrunk by given amount of pixels (*shrinkA *
202201 & *shrinkB *)
203202
2042034. The path is transmuted to arrow patch, which is controlled by the
@@ -209,7 +208,7 @@ The arrow drawing takes a few steps.
209208
210209
211210The creation of the connecting path between two points is controlled by
212- ``connectionstyle `` key and following styles are available.
211+ ``connectionstyle `` key and the following styles are available.
213212
214213 ========== =============================================
215214 Name Attrs
@@ -223,7 +222,7 @@ The creation of the connecting path between two points is controlled by
223222
224223Note that "3" in ``angle3 `` and ``arc3 `` is meant to indicate that the
225224resulting path is a quadratic spline segment (three control
226- points). As will be discussed below, some arrow style option only can
225+ points). As will be discussed below, some arrow style options can only
227226be used when the connecting path is a quadratic spline.
228227
229228The behavior of each connection style is (limitedly) demonstrated in the
@@ -255,9 +254,9 @@ an arrow patch, according to the given ``arrowstyle``.
255254
256255.. plot :: mpl_examples/pylab_examples/fancyarrow_demo.py
257256
258- Some arrowstyles only work with connection style that generates a
257+ Some arrowstyles only work with connection styles that generate a
259258quadratic-spline segment. They are ``fancy ``, ``simple ``, and ``wedge ``.
260- For these arrow styles, you must use "angle3" or "arc3" connection
259+ For these arrow styles, you must use the "angle3" or "arc3" connection
261260style.
262261
263262If the annotation string is given, the patchA is set to the bbox patch
@@ -281,8 +280,8 @@ lower-left corner and (1,1) means top-right.
281280Placing Artist at the anchored location of the Axes
282281---------------------------------------------------
283282
284- There are class of artist that can be placed at the anchored location
285- of the Axes. A common example is the legend. This type of artists can
283+ There are classes of artists that can be placed at an anchored location
284+ in the Axes. A common example is the legend. This type of artist can
286285be created by using the OffsetBox class. A few predefined classes are
287286available in ``mpl_toolkits.axes_grid.anchored_artists ``. ::
288287
@@ -305,10 +304,10 @@ artists) is known in pixel size during the time of creation. For
305304example, If you want to draw a circle with fixed size of 20 pixel x 20
306305pixel (radius = 10 pixel), you can utilize
307306``AnchoredDrawingArea ``. The instance is created with a size of the
308- drawing area (in pixel). And user can add arbitrary artist to the
307+ drawing area (in pixels), and arbitrary artists can added to the
309308drawing area. Note that the extents of the artists that are added to
310- the drawing area has nothing to do with the placement of the drawing
311- area itself. The initial size only matters. ::
309+ the drawing area are not related to the placement of the drawing
310+ area itself. Only the initial size matters. ::
312311
313312 from mpl_toolkits.axes_grid.anchored_artists import AnchoredDrawingArea
314313
@@ -319,27 +318,27 @@ area itself. The initial size only matters. ::
319318 p2 = Circle((30, 10), 5, fc="r")
320319 ada.drawing_area.add_artist(p2)
321320
322- The artists that are added to the drawing area should not have
323- transform set (they will be overridden) and the dimension of those
321+ The artists that are added to the drawing area should not have a
322+ transform set (it will be overridden) and the dimensions of those
324323artists are interpreted as a pixel coordinate, i.e., the radius of the
325- circles in above example are 10 pixel and 5 pixel , respectively.
324+ circles in above example are 10 pixels and 5 pixels , respectively.
326325
327326.. plot :: users/plotting/examples/anchored_box02.py
328327
329- Sometimes, you want to your artists scale with data coordinate (or
330- other coordinate than canvas pixel ). You can use
328+ Sometimes, you want your artists to scale with the data coordinate (or
329+ coordinates other than canvas pixels ). You can use
331330``AnchoredAuxTransformBox `` class. This is similar to
332331``AnchoredDrawingArea `` except that the extent of the artist is
333332determined during the drawing time respecting the specified transform. ::
334333
335334 from mpl_toolkits.axes_grid.anchored_artists import AnchoredAuxTransformBox
336335
337336 box = AnchoredAuxTransformBox(ax.transData, loc=2)
338- el = Ellipse((0,0), width=0.1, height=0.4, angle=30) # in data coordinates!
337+ el = Ellipse((0,0), width=0.1, height=0.4, angle=30) # in data coordinates!
339338 box.drawing_area.add_artist(el)
340339
341340The ellipse in the above example will have width and height
342- corresponds to 0.1 and 0.4 in data coordinate and will be
341+ corresponding to 0.1 and 0.4 in data coordinateing and will be
343342automatically scaled when the view limits of the axes change.
344343
345344.. plot :: users/plotting/examples/anchored_box03.py
@@ -353,10 +352,10 @@ legend (as a matter of fact, this is how the legend is created).
353352Note that unlike the legend, the ``bbox_transform `` is set
354353to IdentityTransform by default.
355354
356- Using Complex Coordinate with Annotation
357- ----------------------------------------
355+ Using Complex Coordinates with Annotations
356+ ------------------------------------------
358357
359- The Annotation in matplotlib support several types of coordinate as
358+ The Annotation in matplotlib supports several types of coordinates as
360359described in :ref: `annotations-tutorial `. For an advanced user who wants
361360more control, it supports a few other options.
362361
@@ -392,16 +391,16 @@ more control, it supports a few other options.
392391
393392 Note that it is your responsibility that the extent of the
394393 coordinate artist (*an1 * in above example) is determined before *an2 *
395- gets drawn. In most cases, it means that an2 needs to be drawn
394+ gets drawn. In most cases, it means that * an2 * needs to be drawn
396395 later than *an1 *.
397396
398397
399398 3. A callable object that returns an instance of either
400399 :class: `~matplotlib.transforms.BboxBase ` or
401400 :class: `~matplotlib.transforms.Transform `. If a transform is
402- returned, it is same as 1 and if bbox is returned, it is same
403- as 2. The callable object should take a single argument of
404- renderer instance. For example, following two commands give
401+ returned, it is the same as 1 and if a bbox is returned, it is the same
402+ as 2. The callable object should take a single argument of the
403+ renderer instance. For example, the following two commands give
405404 identical results ::
406405
407406 an2 = ax.annotate("Test 2", xy=(1, 0.5), xycoords=an1,
@@ -410,22 +409,21 @@ more control, it supports a few other options.
410409 xytext=(30,0), textcoords="offset points")
411410
412411
413- 4. A tuple of two coordinate specification . The first item is for
414- x-coordinate and the second is for y-coordinate. For example, ::
412+ 4. A tuple of two coordinate specifications . The first item is for the
413+ x-coordinate and the second is for the y-coordinate. For example, ::
415414
416415 annotate("Test", xy=(0.5, 1), xycoords=("data", "axes fraction"))
417416
418- 0.5 is in data coordinate , and 1 is in normalized axes coordinate .
417+ 0.5 is in data coordinates , and 1 is in normalized axes coordinates .
419418 You may use an artist or transform as with a tuple. For example,
420419
421420 .. plot :: users/plotting/examples/annotate_simple_coord02.py
422421 :include-source:
423422
424423
425- 5. Sometimes, you want your annotation with some "offset points", but
426- not from the annotated point but from other
427- point. :class: `~matplotlib.text.OffsetFrom ` is a helper class for such
428- case.
424+ 5. Sometimes, you want your annotation with some "offset points", not from the
425+ annotated point but from some other point.
426+ :class: `~matplotlib.text.OffsetFrom ` is a helper class for such cases.
429427
430428 .. plot :: users/plotting/examples/annotate_simple_coord03.py
431429 :include-source:
@@ -435,28 +433,25 @@ more control, it supports a few other options.
435433Using ConnectorPatch
436434--------------------
437435
438- The ConnectorPatch is like an annotation without a text. While the
439- annotate function is recommended in most of situation, the
440- ConnectorPatch is useful when you want to connect points in different
441- axes. ::
436+ The ConnectorPatch is like an annotation without text. While the annotate
437+ function is recommended in most situations, the ConnectorPatch is useful when
438+ you want to connect points in different axes. ::
442439
443440 from matplotlib.patches import ConnectionPatch
444441 xy = (0.2, 0.2)
445442 con = ConnectionPatch(xyA=xy, xyB=xy, coordsA="data", coordsB="data",
446443 axesA=ax1, axesB=ax2)
447444 ax2.add_artist(con)
448445
449- The above code connects point xy in data coordinate of ``ax1 `` to
450- point xy int data coordinate of ``ax2 ``. Here is a simple example.
446+ The above code connects point xy in the data coordinates of ``ax1 `` to
447+ point xy in the data coordinates of ``ax2 ``. Here is a simple example.
451448
452449.. plot :: users/plotting/examples/connect_simple01.py
453450
454451
455- While the ConnectorPatch instance can be added to any axes, but you
456- may want it to be added to the axes in the latter (?) of the axes
457- drawing order to prevent overlap (?) by other axes.
458-
459-
452+ While the ConnectorPatch instance can be added to any axes, you may want to add
453+ it to the axes that is latest in drawing order to prevent overlap by other
454+ axes.
460455
461456
462457Advanced Topics
@@ -466,7 +461,7 @@ Zoom effect between Axes
466461------------------------
467462
468463mpl_toolkits.axes_grid.inset_locator defines some patch classes useful
469- for interconnect two axes. Understanding the code requires some
464+ for interconnecting two axes. Understanding the code requires some
470465knowledge of how mpl's transform works. But, utilizing it will be
471466straight forward.
472467
@@ -478,7 +473,7 @@ Define Custom BoxStyle
478473----------------------
479474
480475You can use a custom box style. The value for the ``boxstyle `` can be a
481- callable object in following forms.::
476+ callable object in the following forms.::
482477
483478 def __call__(self, x0, y0, width, height, mutation_size,
484479 aspect_ratio=1.):
@@ -491,7 +486,7 @@ callable object in following forms.::
491486 - *aspect_ratio* : aspect-ratio for the mutation.
492487 """
493488 path = ...
494- return path
489+ return path
495490
496491Here is a complete example.
497492
@@ -504,6 +499,6 @@ matplotlib.patches.BoxStyle._Base as demonstrated below.
504499 :include-source:
505500
506501
507- Similarly, you can define custom ConnectionStyle and custom ArrowStyle.
502+ Similarly, you can define a custom ConnectionStyle and a custom ArrowStyle.
508503See the source code of ``lib/matplotlib/patches.py `` and check
509504how each style class is defined.
0 commit comments