Last active
June 8, 2020 09:30
-
-
Save hiepph/dc6f3aa00714a75a0968b66f0bbf149f to your computer and use it in GitHub Desktop.
jupyter tricks
This file contains hidden or 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
def display(img): | |
"Display single image" | |
_, ax = plt.subplots(1, 1, figsize=(10, 10)) | |
#plt.axis('off') | |
#plt.title('Title') | |
plt.imshow(img); plt.show() | |
def display_grid(imgs): | |
"Display grid" | |
n_row = 5 | |
n_col = 10 | |
_, axs = plt.subplots(n_row, n_col, figsize=(20, 20)) | |
axs = axs.flatten() | |
for i in range(len(axs)): | |
#axs[i].axis('off') | |
#axs[i].title.set_text('title') | |
axs[i].imshow(imgs[i]) | |
plt.show() |
This file contains hidden or 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
%load_ext autoreload | |
%autoreload 2 | |
%matplotlib inline | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
sns.set() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment