diff --git a/examples/images_contours_and_fields/image_demo.py b/examples/images_contours_and_fields/image_demo.py index 6b73458153e4..83e49217816f 100644 --- a/examples/images_contours_and_fields/image_demo.py +++ b/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 diff --git a/examples/images_contours_and_fields/image_demo_clip_path.py b/examples/images_contours_and_fields/image_demo_clip_path.py index ac61d4f0b8cd..77a7f7718b7f 100644 --- a/examples/images_contours_and_fields/image_demo_clip_path.py +++ b/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') diff --git a/lib/matplotlib/mpl-data/sample_data/lena.npy b/lib/matplotlib/mpl-data/sample_data/lena.npy deleted file mode 100644 index 39f4fb1f07f8..000000000000 Binary files a/lib/matplotlib/mpl-data/sample_data/lena.npy and /dev/null differ