Python2:调整使用Matplotlib打印的图像大小

Python2:调整使用Matplotlib打印的图像大小,python,python-2.7,matplotlib,opencv3.1,Python,Python 2.7,Matplotlib,Opencv3.1,我正在使用带有Python 2+OpenCV 3的Jupyter笔记本进行编码,我需要使用图像显示我的结果。图像非常小,很难观察到结果 from matplotlib import pyplot as plt import cv2 thresh = 127 maxValue = 255 file_path = "dados/page1.jpg" %matplotlib notebook image = cv2.imread(file_path) gray_image = cv2.cvtCol

我正在使用带有Python 2+OpenCV 3的Jupyter笔记本进行编码,我需要使用图像显示我的结果。图像非常小,很难观察到结果

from matplotlib import pyplot as plt
import cv2

thresh = 127
maxValue = 255
file_path = "dados/page1.jpg"
%matplotlib notebook

image = cv2.imread(file_path)
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
plt.title("First image")
plt.imshow(gray_image)
输出图像


图像太小。如何缩放它?

像往常一样,您可以使用

plt.figure(figsize=(8,12))
最大图形大小为
(50,50)
,但是您需要根据屏幕大小自行选择合理的值