Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

plt show 2 images

#subplot(r,c) provide the no. of rows and columns
f, axarr = plt.subplots(2,1) 

# use the created array to output your multiple images. In this case I have stacked 2 images vertically
axarr[0].imshow(img1)
axarr[1].imshow(np.log(img2))

plt.show()
Comment

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()
Comment

PREVIOUS NEXT
Code Example
Python :: how can I plot model in pytorch 
Python :: pandas reorder columns 
Python :: Python program to print odd numbers in a list 
Python :: how to record the steps of mouse and play the steps using python 
Python :: replace error with nan pandas 
Python :: python remove all except numbers 
Python :: python thread with parameters 
Python :: python logging to file 
Python :: pandas print full dataframe 
Python :: delete the duplicates in python 
Python :: what is self keyword in python 
Python :: indices of true boolean array pyton 
Python :: check numpy arrays equal 
Python :: how to check if mouse is over a rect in pygame 
Python :: how to say hello world in python 
Python :: random list python 
Python :: python datetime without seconds 
Python :: how to launch an application using python 
Python :: spyder 3.3.6 requires pyqtwebengine<5.13; python_version = "3", which is not installed. 
Python :: print variable in string python 
Python :: how to remove first letter of a string python 
Python :: TabError: inconsistent use of tabs and spaces in indentation 
Python :: python tkinter set minimum window size 
Python :: except as exception: 
Python :: norm complex numpy 
Python :: python get system information 
Python :: cv2 yellow color range 
Python :: how to make a pythoon turtle follow another? 
Python :: create dictionary comprehension python 
Python :: python test if you can convert to int 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =