Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. directory=os.listdir('main_folder')
  2. for each in directory:
  3.     plt.figure()
  4.     currentFolder = 'main_folder/' + each
  5.     for i, file in enumerate(os.listdir(currentFolder)[0:5]):
  6.         fullpath = main_folder+ "/" + file
  7.         print(fullpath)
  8.         img=mpimg.imread(fullpath)
  9.         plt.subplot(2, 3, i)
  10.         plt.imshow(img)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement