FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib.github.com/mpl_examples/misc/sample_data_demo.py at master · 2236zml/matplotlib.github.com · GitHub
2236zml
matplotlib.github.com
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib.github.com
/
mpl_examples
/
misc
/
sample_data_demo.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
13 lines (12 loc) · 349 Bytes
Breadcrumbs
matplotlib.github.com
/
mpl_examples
/
misc
/
sample_data_demo.py
Copy path
File metadata and controls
13 lines (12 loc) · 349 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
"""
Grab mpl data from the ~/.matplotlib/sample_data cache if it exists, else
fetch it from GitHub and cache it
"""
from
__future__
import
print_function
import
matplotlib
.
cbook
as
cbook
import
matplotlib
.
pyplot
as
plt
fname
=
cbook
.
get_sample_data
(
'ada.png'
,
asfileobj
=
False
)
print
(
'fname'
,
fname
)
im
=
plt
.
imread
(
fname
)
plt
.
imshow
(
im
)
plt
.
show
()
Back
|
FazBrowse Home
|
New Git URL