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 e629aff

Browse filesBrowse files
authored
Merge pull request #18691 from anntzer/usd
Cleanup sample_data.
2 parents 09e364c + f74b9b4 commit e629aff
Copy full SHA for e629aff

File tree

Expand file treeCollapse file tree

12 files changed

+20
-23
lines changed
Filter options
Expand file treeCollapse file tree

12 files changed

+20
-23
lines changed
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
sample_data removals
2+
~~~~~~~~~~~~~~~~~~~~
3+
The sample datasets listed below have been removed. Suggested replacements for
4+
demonstration purposes are listed in parentheses.
5+
- ``None_vs_nearest-pdf.png``,
6+
- ``aapl.npz`` (use ``goog.npz``),
7+
- ``ada.png``, ``grace_hopper.png`` (use ``grace_hopper.jpg``),
8+
- ``ct.raw.gz`` (use ``s1045.ima.gz``),
9+
- ``damodata.csv`` (use ``msft.csv``).

‎examples/images_contours_and_fields/image_clip_path.py

Copy file name to clipboardExpand all lines: examples/images_contours_and_fields/image_clip_path.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import matplotlib.cbook as cbook
1111

1212

13-
with cbook.get_sample_data('grace_hopper.png') as image_file:
13+
with cbook.get_sample_data('grace_hopper.jpg') as image_file:
1414
image = plt.imread(image_file)
1515

1616
fig, ax = plt.subplots()

‎examples/images_contours_and_fields/image_demo.py

Copy file name to clipboardExpand all lines: examples/images_contours_and_fields/image_demo.py
+5-6Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# It is also possible to show images of pictures.
4444

4545
# A sample image
46-
with cbook.get_sample_data('ada.png') as image_file:
46+
with cbook.get_sample_data('grace_hopper.jpg') as image_file:
4747
image = plt.imread(image_file)
4848

4949
fig, ax = plt.subplots()
@@ -53,12 +53,11 @@
5353

5454
# And another image
5555

56-
w, h = 512, 512
57-
58-
with cbook.get_sample_data('ct.raw.gz') as datafile:
56+
# Data are 256x256 16-bit integers.
57+
w, h = 256, 256
58+
with cbook.get_sample_data('s1045.ima.gz') as datafile:
5959
s = datafile.read()
6060
A = np.frombuffer(s, np.uint16).astype(float).reshape((w, h))
61-
A /= A.max()
6261

6362
fig, ax = plt.subplots()
6463
extent = (0, 25, 0, 25)
@@ -68,7 +67,7 @@
6867
x, y = zip(*markers)
6968
ax.plot(x, y, 'o')
7069

71-
ax.set_title('CT density')
70+
ax.set_title('MRI')
7271

7372
plt.show()
7473

‎examples/text_labels_and_annotations/demo_annotation_box.py

Copy file name to clipboardExpand all lines: examples/text_labels_and_annotations/demo_annotation_box.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@
7878
ax.add_artist(ab)
7979

8080
# Annotate the 2nd position with another image (a Grace Hopper portrait)
81-
with get_sample_data("grace_hopper.png") as file:
82-
arr_img = plt.imread(file, format='png')
81+
with get_sample_data("grace_hopper.jpg") as file:
82+
arr_img = plt.imread(file)
8383

8484
imagebox = OffsetImage(arr_img, zoom=0.2)
8585
imagebox.image.axes = ax

‎examples/text_labels_and_annotations/demo_text_path.py

Copy file name to clipboardExpand all lines: examples/text_labels_and_annotations/demo_text_path.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def draw(self, renderer=None):
5252

5353
# EXAMPLE 1
5454

55-
arr = plt.imread(get_sample_data("grace_hopper.png"))
55+
arr = plt.imread(get_sample_data("grace_hopper.jpg"))
5656

5757
text_path = TextPath((0, 0), "!?", size=150)
5858
p = PathClippedImagePatch(text_path, arr, ec="k",

‎examples/ticks_and_spines/centered_ticklabels.py

Copy file name to clipboardExpand all lines: examples/ticks_and_spines/centered_ticklabels.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import matplotlib.ticker as ticker
2424
import matplotlib.pyplot as plt
2525

26-
# load some financial data; apple's stock price
27-
r = (cbook.get_sample_data('aapl.npz', np_load=True)['price_data']
26+
# load some financial data; Google's stock price
27+
r = (cbook.get_sample_data('goog.npz', np_load=True)['price_data']
2828
.view(np.recarray))
2929
r = r[-250:] # get the last 250 days
3030

Binary file not shown.
-105 KB
Binary file not shown.
-301 KB
Binary file not shown.
-250 KB
Binary file not shown.

‎lib/matplotlib/mpl-data/sample_data/demodata.csv

Copy file name to clipboardExpand all lines: lib/matplotlib/mpl-data/sample_data/demodata.csv
-11Lines changed: 0 additions & 11 deletions
This file was deleted.
Binary file not shown.

0 commit comments

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