遇见YY

导航

 
import numpy as np
import pylab as pl

if __name__ == '__main__':
fig = pl.figure(figsize=(10, 5))
ax = fig.add_subplot(121)
toplot = np.random.randint(0, 255, [40, 40])
pl.text(1, 3, 'Left picture', fontsize=20)
pl.imshow(toplot)
ax = fig.add_subplot(122)
toplot = np.random.randint(0, 2, [40, 40])
pl.text(1, 3, 'Right picture', fontsize=20)
pl.imshow(toplot)
pl.savefig('image_%d.png' % 0)

 

posted on 2020-11-30 21:14  一骑红尘妃子笑!  阅读(686)  评论(0编辑  收藏  举报