Python 2.7 “绘图”;“大的”;带有matplotlib的点的图像-MemoryError

Python 2.7 “绘图”;“大的”;带有matplotlib的点的图像-MemoryError,python-2.7,matplotlib,Python 2.7,Matplotlib,我想画一幅3193 x 3293像素的图像,有1502个点。 在较小的图像和较少的点(934722像素和60点)中运行时,一切运行都非常完美 我这样写道: # I am just giving the general characteristics of the data; img = numpy.ndarray, dtype = uint8, shape = (3193,3293) points = numpy.ndarray, dtype = int32, shape = (150

我想画一幅3193 x 3293像素的图像,有1502个点。 在较小的图像和较少的点(934722像素和60点)中运行时,一切运行都非常完美

我这样写道:

# I am just giving the general characteristics of the data;    
img = numpy.ndarray, dtype = uint8, shape = (3193,3293) 
points = numpy.ndarray, dtype = int32, shape = (1502,2)

plt.imshow(img, cmap=plt.cm.gray_r)
plt.autoscale(False)
plt.plot(points[:, 1], points[:, 0], 'r.', markersize = 15)
plt.axis('off')
plt.show()
有没有其他方法可以在不使用那么多内存的情况下实现这一点

谢谢你的关注