Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Replace usage of Lena image in the gallery. #1976

Merged
merged 1 commit into from

2 participants

@tonysyu

Note that lena.npy was created in PR #1924 before I realized matplotlib could read png images without PIL. That file wasn't used anywhere else, so I remove it here.

@tonysyu tonysyu Replace usage of Lena image in the gallery.
Note that lena.npy was created in PR #1924 before I realized matplotlib could read png images without PIL. That file wasn't used anywhere else, so I remove it here.
25aba29
@mdboom mdboom merged commit 1d94744 into matplotlib:master

1 check failed

Details default The Travis build could not complete due to an error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 5, 2013
  1. @tonysyu

    Replace usage of Lena image in the gallery.

    tonysyu authored
    Note that lena.npy was created in PR #1924 before I realized matplotlib could read png images without PIL. That file wasn't used anywhere else, so I remove it here.
This page is out of date. Refresh to see the latest.
View
5 examples/images_contours_and_fields/image_demo.py
@@ -1,12 +1,11 @@
"""
Simple demo of the imshow function.
"""
-import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
-image_file = cbook.get_sample_data('lena.npy')
-image = np.load(image_file)
+image_file = cbook.get_sample_data('ada.png')
+image = plt.imread(image_file)
plt.imshow(image)
plt.axis('off') # clear x- and y-axes
View
7 examples/images_contours_and_fields/image_demo_clip_path.py
@@ -1,18 +1,17 @@
"""
Demo of image that's been clipped by a circular patch.
"""
-import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import matplotlib.cbook as cbook
-image_file = cbook.get_sample_data('lena.npy')
-image = np.load(image_file)
+image_file = cbook.get_sample_data('grace_hopper.png')
+image = plt.imread(image_file)
fig, ax = plt.subplots()
im = ax.imshow(image)
-patch = patches.Circle((130, 130), radius=100, transform=ax.transData)
+patch = patches.Circle((260, 200), radius=200, transform=ax.transData)
im.set_clip_path(patch)
plt.axis('off')
View
BIN  lib/matplotlib/mpl-data/sample_data/lena.npy
Binary file not shown
Something went wrong with that request. Please try again.