def column_img_vertical(uid,fieldid,img_type1,img_type2): import matplotlib.pyplot as plt import cv2 fig = plt.gcf() fig.set_size_inches(6,6) img1 = cv2.imread((uid+img_type1+'.png')) img2 = cv2.imread((img_type2+'.jpg')) plt.subplot(2,1,1) plt.imshow(img1) plt.height(5) plt.tight_layout() plt.axis('off') plt.subplot(2,1,2) plt.imshow(img2) plt.set_figheight(1) plt.tight_layout() plt.axis('off') #plt.show() plt.savefig((uid+'_collage'+img_type1+img_type2+'.png')) plt.close()