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

📄 axes_demo.py

📁 非原创。很好的python例子
💻 PY
字号:
#!/usr/bin/env python from pylab import *# create some data to use for the plotdt = 0.001t = arange(0.0, 10.0, dt)r = exp(-t[:1000]/0.05)               # impulse responsex = randn(len(t))s = convolve(x,r,mode=2)[:len(x)]*dt  # colored noise# the main axes is subplot(111) by defaultplot(t, s)axis([0, 1, 1.1*amin(s), 2*amax(s) ])xlabel('time (s)')ylabel('current (nA)')title('Gaussian colored noise')# this is an inset axes over the main axesa = axes([.65, .6, .2, .2], axisbg='y')n, bins, patches = hist(s, 400, normed=1)title('Probability')setp(a, xticks=[], yticks=[])# this is another inset axes over the main axesa = axes([0.2, 0.6, .2, .2], axisbg='y')plot(t[:len(r)], r)title('Impulse response')setp(a, xlim=(0,.2), xticks=[], yticks=[])    #savefig('../figures/axes_demo.eps')#savefig('../figures/axes_demo.png')show()

⌨️ 快捷键说明

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