|
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: |
|
91 | 91 | # |
92 | 92 | # Each inner list represents a pixel. Here, with an RGB image, there |
93 | 93 | # are 3 values. Since it's a black and white image, R, G, and B are all |
94 | | -# similar. An RGBA (where A is alpha, or transparency), has 4 values |
| 94 | +# similar. An RGBA (where A is alpha, or transparency) has 4 values |
95 | 95 | # per inner list, and a simple luminance image just has one value (and |
96 | 96 | # is thus only a 2-D array, not a 3-D array). For RGB and RGBA images, |
97 | 97 | # Matplotlib supports float32 and uint8 data types. For grayscale, |
|
127 | 127 | # Pseudocolor is only relevant to single-channel, grayscale, luminosity |
128 | 128 | # images. We currently have an RGB image. Since R, G, and B are all |
129 | 129 | # similar (see for yourself above or in your data), we can just pick one |
130 | | -# channel of our data: |
| 130 | +# channel of our data using array slicing (you can read more in the |
| 131 | +# `Numpy tutorial <https://numpy.org/doc/stable/user/quickstart.html |
| 132 | +# #indexing-slicing-and-iterating>`_): |
131 | 133 |
|
132 | 134 | lum_img = img[:, :, 0] |
133 | | - |
134 | | -# This is array slicing. You can read more in the `Numpy tutorial |
135 | | -# <https://numpy.org/doc/stable/user/quickstart.html>`_. |
136 | | - |
137 | 135 | plt.imshow(lum_img) |
138 | 136 |
|
139 | 137 | ############################################################################### |
|
0 commit comments