Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fe31e61

Browse filesBrowse files
committed
Update image tutorial wrt. removal of native png handler.
Everything goes through Pillow now. + minor capitalization fixes.
1 parent 30282cf commit fe31e61
Copy full SHA for fe31e61

File tree

Expand file treeCollapse file tree

1 file changed

+6
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-10
lines changed

‎tutorials/introductory/images.py

Copy file name to clipboardExpand all lines: tutorials/introductory/images.py
+6-10Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
cells below those that create the plot will change the plot - it is a
3838
live object in memory.
3939
40-
This tutorial will use matplotlib's imperative-style plotting
40+
This tutorial will use Matplotlib's imperative-style plotting
4141
interface, pyplot. This interface maintains global state, and is very
4242
useful for quickly and easily experimenting with various plot
4343
settings. The alternative is the object-oriented interface, which is also
@@ -55,15 +55,11 @@
5555
# .. _importing_data:
5656
#
5757
# Importing image data into Numpy arrays
58-
# ===============================================
58+
# ======================================
5959
#
60-
# Loading image data is supported by the `Pillow
61-
# <https://pillow.readthedocs.io/en/latest/>`_ library. Natively, Matplotlib
62-
# only supports PNG images. The commands shown below fall back on Pillow if
63-
# the native read fails.
60+
# Matplotlib relies on the Pillow_ library to load image data.
6461
#
65-
# The image used in this example is a PNG file, but keep that Pillow
66-
# requirement in mind for your own data.
62+
# .. _Pillow: https://pillow.readthedocs.io/en/latest/
6763
#
6864
# Here's the image we're going to play with:
6965
#
@@ -98,8 +94,8 @@
9894
# similar. An RGBA (where A is alpha, or transparency), has 4 values
9995
# per inner list, and a simple luminance image just has one value (and
10096
# is thus only a 2-D array, not a 3-D array). For RGB and RGBA images,
101-
# matplotlib supports float32 and uint8 data types. For grayscale,
102-
# matplotlib supports only float32. If your array data does not meet
97+
# Matplotlib supports float32 and uint8 data types. For grayscale,
98+
# Matplotlib supports only float32. If your array data does not meet
10399
# one of these descriptions, you need to rescale it.
104100
#
105101
# .. _plotting_data:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.