New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show our data in the gallery #3388
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0b0d285
Show our data to gallery
sciunto f4d59bf
fix typo
sciunto d4e6824
Apply @Emmas comments
sciunto 0966ed0
Add page for specific purpose images
sciunto b1554a3
Integrate lwm dataset
sciunto 03ee21f
set grayscale if needed, add comments
sciunto 4cef9af
First image as thumbnail
sciunto 7d48ee0
inscrease font size
sciunto File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Data | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
""" | ||
====================== | ||
General-purpose images | ||
====================== | ||
|
||
The title of each image indicates the name of the function. | ||
|
||
""" | ||
import matplotlib.pyplot as plt | ||
import matplotlib | ||
|
||
from skimage import data | ||
|
||
matplotlib.rcParams['font.size'] = 18 | ||
|
||
images = ('astronaut', | ||
'binary_blobs', | ||
'camera', | ||
'checkerboard', | ||
'chelsea', | ||
'clock', | ||
'coffee', | ||
'coins', | ||
'horse', | ||
'logo', | ||
'page', | ||
'text', | ||
'rocket', | ||
) | ||
|
||
|
||
for name in images: | ||
caller = getattr(data, name) | ||
image = caller() | ||
plt.figure() | ||
plt.title(name) | ||
if image.ndim == 2: | ||
plt.imshow(image, cmap=plt.cm.gray) | ||
else: | ||
plt.imshow(image) | ||
|
||
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" | ||
================= | ||
Scientific images | ||
================= | ||
|
||
The title of each image indicates the name of the function. | ||
|
||
""" | ||
import matplotlib.pyplot as plt | ||
import matplotlib | ||
|
||
from skimage import data | ||
|
||
matplotlib.rcParams['font.size'] = 18 | ||
|
||
images = ('hubble_deep_field', | ||
'immunohistochemistry', | ||
'moon', | ||
) | ||
|
||
|
||
for name in images: | ||
caller = getattr(data, name) | ||
image = caller() | ||
plt.figure() | ||
plt.title(name) | ||
if image.ndim == 2: | ||
plt.imshow(image, cmap=plt.cm.gray) | ||
else: | ||
plt.imshow(image) | ||
|
||
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
""" | ||
=============== | ||
Specific images | ||
=============== | ||
|
||
""" | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
import matplotlib | ||
|
||
from skimage import data | ||
|
||
matplotlib.rcParams['font.size'] = 18 | ||
|
||
###################################################################### | ||
# | ||
# Stereo images | ||
# ============= | ||
|
||
|
||
fig, axes = plt.subplots(1, 2, figsize=(8, 4)) | ||
ax = axes.ravel() | ||
|
||
images = data.stereo_motorcycle() | ||
ax[0].imshow(images[0]) | ||
ax[1].imshow(images[1]) | ||
|
||
fig.tight_layout() | ||
plt.show() | ||
|
||
###################################################################### | ||
# | ||
# Faces and non-faces dataset | ||
# =========================== | ||
# | ||
# A sample of 20 over 200 images is displayed. | ||
|
||
|
||
fig, axes = plt.subplots(4, 5, figsize=(20, 20)) | ||
ax = axes.ravel() | ||
images = data.lfw_subset() | ||
for i in range(20): | ||
ax[i].imshow(images[90+i], cmap=plt.cm.gray) | ||
ax[i].axis('off') | ||
fig.tight_layout() | ||
plt.show() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just noticed that you don't set titles in this example. The font config doesn't really make sense then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other examples look great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just to keep the tics homogeneous...