Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- directory=os.listdir('main_folder')
- for each in directory:
- plt.figure()
- currentFolder = 'main_folder/' + each
- for i, file in enumerate(os.listdir(currentFolder)[0:5]):
- fullpath = main_folder+ "/" + file
- print(fullpath)
- img=mpimg.imread(fullpath)
- plt.subplot(2, 3, i)
- plt.imshow(img)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement