Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

show multiple matplotlib images

import numpy as np
import matplotlib.pyplot as plt

w = 10
h = 10
fig = plt.figure(figsize=(8, 8))
columns = 4
rows = 5
for i in range(1, columns*rows +1):
    img = np.random.randint(10, size=(h,w))
    fig.add_subplot(rows, columns, i)
    plt.imshow(img)
plt.show()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #show #multiple #matplotlib #images
ADD COMMENT
Topic
Name
9+2 =