|
41 | 41 | interface maintains global state, and is very useful for quickly and easily
|
42 | 42 | experimenting with various plot settings. The alternative is the explicit,
|
43 | 43 | which is more suitable for large application development. For an explanation
|
44 |
| -of the tradeoffs between the implicit and explicit interfaces See |
| 44 | +of the tradeoffs between the implicit and explicit interfaces see |
45 | 45 | :ref:`api_interfaces` and the :doc:`Quick start guide
|
46 | 46 | </tutorials/introductory/quick_start>` to start using the explicit interface.
|
47 | 47 | For now, let's get on with the implicit approach:
|
|
83 | 83 | ###############################################################################
|
84 | 84 | # Each inner list represents a pixel. Here, with an RGB image, there
|
85 | 85 | # are 3 values. Since it's a black and white image, R, G, and B are all
|
86 |
| -# similar. An RGBA (where A is alpha, or transparency), has 4 values |
| 86 | +# similar. An RGBA (where A is alpha, or transparency) has 4 values |
87 | 87 | # per inner list, and a simple luminance image just has one value (and
|
88 | 88 | # is thus only a 2-D array, not a 3-D array). For RGB and RGBA images,
|
89 | 89 | # Matplotlib supports float32 and uint8 data types. For grayscale,
|
|
119 | 119 | # Pseudocolor is only relevant to single-channel, grayscale, luminosity
|
120 | 120 | # images. We currently have an RGB image. Since R, G, and B are all
|
121 | 121 | # similar (see for yourself above or in your data), we can just pick one
|
122 |
| -# channel of our data: |
| 122 | +# channel of our data using array slicing (you can read more in the |
| 123 | +# `Numpy tutorial <https://numpy.org/doc/stable/user/quickstart.html |
| 124 | +# #indexing-slicing-and-iterating>`_): |
123 | 125 |
|
124 | 126 | lum_img = img[:, :, 0]
|
125 |
| - |
126 |
| -# This is array slicing. You can read more in the `Numpy tutorial |
127 |
| -# <https://numpy.org/doc/stable/user/quickstart.html>`_. |
128 |
| - |
129 | 127 | plt.imshow(lum_img)
|
130 | 128 |
|
131 | 129 | ###############################################################################
|
|
0 commit comments