I am trying to plot multiple images from a file in jupyter notebook. The images are displayed, but they are in one column. I'm using:
%matplotlib inline
from os import listdir
form PIL import image as PImage
from matplotlib import pyplot as plt
def loadImages(path):
imagesList = listdir(path)
loadedImages = []
for image in imagesList:
img = PImage.open(path+image)
LoadedImages.append(img)
Return loadedImages
path = 'C:/Users/Asus-PC/flowers/'
imgs = loadImages(path)
for img in imgs
plt.figure()
plt.imshow(img)
I would like them to appear in a grid layout (row and column). Part of the problem is that I do not know what the arguments to add_subplot mean. How can I achieve this?