Skip to content

Commit 06c6c27

Browse files
authored
Merge pull request rougier#10 from tommyod/spelling
Minor spellcheck
2 parents 6fd6220 + 57f12bc commit 06c6c27

2 files changed

Lines changed: 30 additions & 28 deletions

File tree

README.rst

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ IPython and the pylab mode
4646

4747
`IPython <http://ipython.org/>`_ is an enhanced interactive Python shell that
4848
has lots of interesting features including named inputs and outputs, access to
49-
shell commands, improved debugging and many more. When we start it with the
49+
shell commands, improved debugging and much more. When we start it with the
5050
command line argument -pylab (--pylab since IPython version 0.12), it allows
5151
interactive matplotlib sessions that have Matlab/Mathematica-like functionality.
5252

@@ -68,17 +68,17 @@ In this section, we want to draw the cosine and sine functions on the same
6868
plot. Starting from the default settings, we'll enrich the figure step by step
6969
to make it nicer.
7070

71-
First step is to get the data for the sine and cosine functions:
71+
The first step is to get the data for the sine and cosine functions:
7272

7373
::
7474

7575
import numpy as np
7676

77-
X = np.linspace(-np.pi, np.pi, 256,endpoint=True)
78-
C,S = np.cos(X), np.sin(X)
77+
X = np.linspace(-np.pi, np.pi, 256, endpoint=True)
78+
C, S = np.cos(X), np.sin(X)
7979

8080

81-
X is now a numpy array with 256 values ranging from -π to +π (included). C is
81+
X is now a NumPy array with 256 values ranging from -π to +π (included). C is
8282
the cosine (256 values) and S is the sine (256 values).
8383

8484
To run the example, you can download each of the examples and run it using::
@@ -148,7 +148,7 @@ Changing colors and line widths
148148
:align: right
149149
:target: scripts/exercice_3.py
150150

151-
First step, we want to have the cosine in blue and the sine in red and a
151+
As a first step, we want to have the cosine in blue and the sine in red and a
152152
slightly thicker line for both of them. We'll also slightly alter the figure
153153
size to make it more horizontal.
154154

@@ -325,7 +325,7 @@ Annotate some points
325325
:align: right
326326
:target: scripts/exercice_9.py
327327

328-
Let's annotate some interesting points using the annotate command. We chose the
328+
Let's annotate some interesting points using the annotate command. We choose the
329329
2π/3 value and we want to annotate both the sine and the cosine. We'll first
330330
draw a marker on the curve as well as a straight dotted line. Then, we'll use
331331
the annotate command to display some text with an arrow.
@@ -421,7 +421,7 @@ The defaults can be specified in the resource file and will be used most of the
421421
time. Only the number of the figure is frequently changed.
422422

423423
When you work with the GUI you can close a figure by clicking on the x in the
424-
upper right corner. But you can close a figure programmatically by calling
424+
upper right corner. You can also close a figure programmatically by calling
425425
close. Depending on the argument it closes (1) the current figure (no
426426
argument), (2) a specific figure (figure number or figure instance as
427427
argument), or (3) all figures (all as argument).
@@ -468,7 +468,7 @@ Well formatted ticks are an important part of publishing-ready
468468
figures. Matplotlib provides a totally configurable system for ticks. There are
469469
tick locators to specify where ticks should appear and tick formatters to give
470470
ticks the appearance you want. Major and minor ticks can be located and
471-
formatted independently from each other. Per default minor ticks are not shown,
471+
formatted independently from each other. By default minor ticks are not shown,
472472
i.e. there is only an empty list for them because it is as NullLocator (see
473473
below).
474474

@@ -534,7 +534,7 @@ For quite a long time, animation in matplotlib was not an easy task and was
534534
done mainly through clever hacks. However, things have started to change since
535535
version 1.1 and the introduction of tools for creating animation very
536536
intuitively, with the possibility to save them in all kind of formats (but don't
537-
expect to be able to run very complex animation at 60 fps though).
537+
expect to be able to run very complex animations at 60 fps though).
538538

539539
.. admonition:: Documentation
540540

@@ -567,10 +567,10 @@ First step is to create a blank figure:
567567
568568
Next, we need to create several rings. For this, we can use the scatter plot
569569
object that is generally used to visualize points cloud, but we can also use it
570-
to draw rings by specifying we don't have a facecolor. We have also to take
571-
care of initial size and color for each ring such that we have all size between
572-
a minimum and a maximum size and also to make sure the largest ring is almost
573-
transparent.
570+
to draw rings by specifying we don't have a facecolor. We also have to take
571+
care of initial size and color for each ring such that we have all sizes between
572+
a minimum and a maximum size. In addition, we need to make sure the largest ring
573+
is almost transparent.
574574

575575

576576
.. image:: figures/rain-static.png
@@ -606,10 +606,10 @@ transparent.
606606
607607
608608
Now, we need to write the update function for our animation. We know that at
609-
each time step each ring should grow be more transparent while largest ring
610-
should be totally transparent and thus removed. Of course, we won't actually
611-
remove the largest ring but re-use it to set a new ring at a new random
612-
position, with nominal size and color. Hence, we keep the number of ring
609+
each time step each ring should grow and become more transparent while the
610+
largest ring should be totally transparent and thus removed. Of course, we won't
611+
actually remove the largest ring but re-use it to set a new ring at a new random
612+
position, with nominal size and color. Hence, we keep the number of rings
613613
constant.
614614

615615

@@ -670,7 +670,7 @@ this already represent more than 300 earthquakes in the last 30 days.
670670

671671

672672
First step is to read and convert data. We'll use the `urllib` library that
673-
allows to open and read remote data. Data on the website use the `CSV` format
673+
allows us to open and read remote data. Data on the website use the `CSV` format
674674
whose content is given by the first line::
675675

676676
time,latitude,longitude,depth,mag,magType,nst,gap,dmin,rms,net,id,updated,place,type
@@ -713,7 +713,7 @@ time of event (ok, that's bad, feel free to send me a PR).
713713
E['magnitude'][i] = float(row[4])
714714
715715
716-
Now, we need to draw earth on a figure to show precisely where the earthquake
716+
Now, we need to draw the earth on a figure to show precisely where the earthquake
717717
center is and to translate latitude/longitude in some coordinates matplotlib
718718
can handle. Fortunately, there is the `basemap
719719
<http://matplotlib.org/basemap/>`_ project (that tends to be replaced by the
@@ -738,7 +738,7 @@ Next, we request to draw coastline and fill continents:
738738
earth.drawcoastlines(color='0.50', linewidth=0.25)
739739
earth.fillcontinents(color='0.95')
740740
741-
The `earth` object will also be used to translate coordinate quite
741+
The `earth` object will also be used to translate coordinates quite
742742
automatically. We are almost finished. Last step is to adapt the rain code and
743743
put some eye candy:
744744

@@ -840,7 +840,9 @@ Regular Plots
840840
command.
841841

842842
Starting from the code below, try to reproduce the graphic on the right taking
843-
care of filled areas::
843+
care of filled areas.
844+
845+
::
844846

845847
import numpy as np
846848
import matplotlib.pyplot as plt
@@ -973,7 +975,7 @@ Imshow
973975

974976
You need to take care of the ``origin`` of the image in the imshow command and
975977
use a `colorbar
976-
<http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.colorbar>`_
978+
<http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.colorbar>`_.
977979

978980

979981
Starting from the code below, try to reproduce the graphic on the right taking
@@ -1116,7 +1118,7 @@ Polar Axis
11161118

11171119
.. admonition:: Hints
11181120

1119-
You only need to modify the ``axes`` line
1121+
You only need to modify the ``axes`` line.
11201122

11211123

11221124
Starting from the code below, try to reproduce the graphic on the right.
@@ -1153,7 +1155,7 @@ Click on figure for solution.
11531155
.. admonition:: Hints
11541156

11551157
You need to use `contourf
1156-
<http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.contourf>`_
1158+
<http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.contourf>`_.
11571159

11581160

11591161
Starting from the code below, try to reproduce the graphic on the right.
@@ -1192,7 +1194,7 @@ Text
11921194
Have a look at the `matplotlib logo
11931195
<http://matplotlib.sourceforge.net/examples/api/logo2.html>`_.
11941196

1195-
Try to do the same from scratch !
1197+
Try to do the same from scratch!
11961198

11971199
Click on figure for solution.
11981200

@@ -1663,7 +1665,7 @@ Colormaps
16631665
All colormaps can be reversed by appending ``_r``. For instance, ``gray_r`` is
16641666
the reverse of ``gray``.
16651667

1666-
If you want to know more about colormaps, checks `Documenting the matplotlib
1668+
If you want to know more about colormaps, see `Documenting the matplotlib
16671669
colormaps <https://gist.github.com/2719900>`_.
16681670

16691671

scripts/exercice_2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import matplotlib.pyplot as plt
99

1010
# Create a new figure of size 8x6 points, using 100 dots per inch
11-
plt.figure(figsize=(8,6), dpi=80)
11+
plt.figure(figsize=(8,6), dpi=100)
1212

1313
# Create a new subplot from a grid of 1x1
1414
plt.subplot(111)

0 commit comments

Comments
 (0)