8000 Merge pull request #27268 from anntzer/d · ngmatt882/matplotlib@3c56987 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3c56987

Browse files
authored
Merge pull request matplotlib#27268 from anntzer/d
Copy-edit various examples.
2 parents 4524fdb + 1abf0a4 commit 3c56987

File tree

14 files changed

+42
-61
lines changed

14 files changed

+42
-61
lines changed

galleries/examples/color/README.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
Color
44
=====
55

6-
For more in-depth information about the colormaps available in matplotlib
7-
as well as a description of their properties,
6+
For a description of the colormaps available in Matplotlib,
87
see the :ref:`colormaps tutorial <tutorials-colors>`.

galleries/examples/color/named_colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
List of named colors
44
====================
55
6-
This plots a list of the named colors supported in matplotlib.
6+
This plots a list of the named colors supported by Matplotlib.
77
For more information on colors in matplotlib see
88
99
* the :ref:`colors_def` tutorial;

galleries/examples/images_contours_and_fields/image_demo.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
"""
2-
==========
3-
Image demo
4-
==========
5-
6-
Many ways to plot images in Matplotlib.
2+
========================
3+
Many ways to plot images
4+
========================
75
86
The most common way to plot images in Matplotlib is with
97
`~.axes.Axes.imshow`. The following examples demonstrate much of the

galleries/examples/images_contours_and_fields/pcolor_demo.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
"""
2-
===========
3-
Pcolor demo
4-
===========
2+
=============
3+
pcolor images
4+
=============
55
6-
Generating images with `~.axes.Axes.pcolor`.
7-
8-
Pcolor allows you to generate 2D image-style plots. Below we will show how
9-
to do so in Matplotlib.
6+
`~.Axes.pcolor` generates 2D image-style plots, as illustrated below.
107
"""
8+
119
import matplotlib.pyplot as plt
1210
import numpy as np
1311

galleries/examples/text_labels_and_annotations/accented_text.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
r"""
2-
=================================
3-
Using accented text in Matplotlib
4-
=================================
2+
=============
3+
Accented text
4+
=============
55
66
Matplotlib supports accented characters via TeX mathtext or Unicode.
77

galleries/examples/text_labels_and_annotations/annotation_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Annotating Plots
44
================
55
6-
The following examples show how it is possible to annotate plots in Matplotlib.
6+
The following examples show ways to annotate plots in Matplotlib.
77
This includes highlighting specific points of interest and using various
88
visual tools to call attention to this point. For a more complete and in-depth
99
description of the annotation and text tools in Matplotlib, see the

galleries/examples/text_labels_and_annotations/font_file.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
r"""
2-
===================================
3-
Using a ttf font file in Matplotlib
4-
===================================
2+
====================
3+
Using ttf font files
4+
====================
55
66
Although it is usually not a good idea to explicitly point to a single ttf file
77
for a font instance, you can do so by passing a `pathlib.Path` instance as the

galleries/examples/text_labels_and_annotations/legend_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
Legend Demo
44
===========
55
6-
Plotting legends in Matplotlib.
7-
86
There are many ways to create and customize legends in Matplotlib. Below
97
we'll show a few examples for how to do so.
108

galleries/users_explain/axes/constrainedlayout_guide.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,13 @@
4040
4141
.. warning::
4242
43-
Calling ``plt.tight_layout()`` will turn off *constrained layout*!
43+
Calling `~.pyplot.tight_layout` will turn off *constrained layout*!
4444
4545
Simple example
4646
==============
4747
48-
In Matplotlib, the location of Axes (including subplots) are specified in
49-
normalized figure coordinates. It can happen that your axis labels or titles
50-
(or sometimes even ticklabels) go outside the figure area, and are thus
51-
clipped.
48+
With the default Axes positioning, the axes title, axis labels, or tick labels
49+
can sometimes go outside the figure area, and thus get clipped.
5250
"""
5351

5452
# sphinx_gallery_thumbnail_number = 18

galleries/users_explain/axes/legend_guide.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77
Legend guide
88
============
99
10-
Generating legends flexibly in Matplotlib.
11-
1210
.. currentmodule:: matplotlib.pyplot
1311
14-
This legend guide is an extension of the documentation available at
15-
:func:`~matplotlib.pyplot.legend` - please ensure you are familiar with
16-
contents of that documentation before proceeding with this guide.
12+
This legend guide extends the `~.Axes.legend` docstring -
13+
please read it before proceeding with this guide.
1714
1815
This guide makes use of some common terms, which are documented here for
1916
clarity:
@@ -62,8 +59,8 @@
6259
line_down, = ax.plot([3, 2, 1], label='Line 1')
6360
ax.legend(handles=[line_up, line_down])
6461
65-
In some cases, it is not possible to set the label of the handle, so it is
66-
possible to pass through the list of labels to :func:`legend`::
62+
In the rare case where the labels cannot directly be set on the handles, they
63+
can also be directly passed to :func:`legend`::
6764
6865
fig, ax = plt.subplots()
6966
line_up, = ax.plot([1, 2, 3], label='Line 2')

0 commit comments

Comments
 (0)
0