Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Replace usage of Lena image in the gallery. #1976

Merged
merged 1 commit into from

2 participants

Tony S Yu Michael Droettboom
Tony S Yu

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.

Tony S Yu 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
Michael Droettboom mdboom merged commit 1d94744 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 5, 2013
  1. Tony S Yu

    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.
5 examples/images_contours_and_fields/image_demo.py
View
@@ -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
7 examples/images_contours_and_fields/image_demo_clip_path.py
View
@@ -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')
BIN  lib/matplotlib/mpl-data/sample_data/lena.npy
View
Binary file not shown
Something went wrong with that request. Please try again.