@@ -10,36 +10,28 @@ Image tutorial
1010Startup commands
1111===================
1212
13- At the very least, you'll need to have access to the
14- :func: `~matplotlib.pyplot.imshow ` function. There are a couple of
15- ways to do it. The easy way for an interactive environment::
16-
13+ In this tutorial we will work interactively with images. To do so we will use
14+ the IPython shell. You can start it with::
15+
1716 $ipython
1817
19- to enter the ipython shell, followed by::
20-
21- In [1]: %pylab
22-
23- to enter the pylab environment.
24-
25- The imshow function is now directly accessible (it's in your
26- `namespace <http://bytebaker.com/2008/07/30/python-namespaces/ >`_).
27- See also :ref: `pyplot-tutorial `.
28-
29- The more expressive, easier to understand later method (use this in
30- your scripts to make it easier for others (including your future self)
31- to read) is to use the matplotlib API (see :ref: `artist-tutorial `)
32- where you use explicit namespaces and control object creation, etc...
18+ At the very least, you'll need to have access to the
19+ :func: `~matplotlib.pyplot.imshow ` function. The easy way for an interactive
20+ environment: is to use the matplotlib API (see :ref: `artist-tutorial `) where
21+ you use explicit
22+ `namespaces <http://bytebaker.com/2008/07/30/python-namespaces/ >`_ and control
23+ object creation, etc...::
3324
3425.. sourcecode :: ipython
3526
3627 In [1]: import matplotlib.pyplot as plt
3728 In [2]: import matplotlib.image as mpimg
3829 In [3]: import numpy as np
3930
40- Examples below will use the latter method, for clarity. In these
41- examples, if you use the %pylab method, you can skip the "mpimg." and
42- "plt." prefixes.
31+ You can now access functions like :func: `~matplotlib.pyplot.imshow ` by using:
32+ `plt.imshow(yourimage) `. You can learn more about these functions in the
33+ :ref: `pyplot-tutorial `.
34+
4335
4436.. _importing_data :
4537
0 commit comments