⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 image_origin.py

📁 非原创。很好的python例子
💻 PY
字号:
#!/usr/bin/env python"""You can specify whether images should be plotted with the array originx[0,0] in the upper left or upper right by using the origin parameter.You can also control the default be setting image.origin in yourmatplotlibrc file; see http://matplotlib.sourceforge.net/.matplotlibrc"""from pylab import *x = arange(100.0); x.shape = 10,10interp = 'bilinear';#interp = 'nearest';lim = -2,11,-2,6subplot(211, axisbg='g')title('blue should be up')imshow(x, origin='upper', interpolation=interp)#axis(lim)subplot(212, axisbg='y')title('blue should be down')imshow(x, origin='lower', interpolation=interp)#axis(lim)savefig('image_origin')show()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -