Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Plot multiple image in Matplotlib
def my_plot():
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure(figsize=(8, 8))
columns, rows = 4, 5
for i in range(1, columns * rows + 1):
img = np.random.randint(10, size=(10, 10))
fig.add_subplot(rows, columns, i)
plt.gca().axes.get_yaxis().set_visible(False)
plt.gca().axes.get_xaxis().set_visible(False)
plt.imshow(img)
plt.show()
@uzl

This comment has been minimized.

Copy link
Owner Author

uzl commented May 21, 2019

samplt_multi_imae

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.