FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/examples/misc/sample_data_demo.py at master · thomasgit/matplotlib · GitHub
thomasgit
matplotlib
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
examples
/
misc
/
sample_data_demo.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
13 lines (12 loc) · 350 Bytes
Breadcrumbs
matplotlib
/
examples
/
misc
/
sample_data_demo.py
Copy path
File metadata and controls
13 lines (12 loc) · 350 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
(
'lena.png'
,
asfileobj
=
False
)
print
(
'fname'
,
fname
)
im
=
plt
.
imread
(
fname
)
plt
.
imshow
(
im
)
plt
.
show
()
Back
|
FazBrowse Home
|
New Git URL