Python 学习
安装 matplotlib
http://matplotlib.org/users/installing.html
《(书签)用python做科学计算》
代码:
import numpy as np import matplotlib.pyplot as plt x = np.linspace(0,10,1000) y = np.sin(x) z = np.cos(x*2.0) plt.figure(figsize = (8,4)) plt.plot(x,y,label = "$sin(x)$",color="red",linewidth=2) plt.plot(x,z,"b--",label="$cos(2*x)$") plt.xlabel("time(s)") plt.ylabel("Volt") plt.title("PyPlot first Example") plt.ylim(-2,2) plt.legend() plt.show()
结果:
Jupiter
https://github.com/jrjohansson/scientific-python-lectures
安装Jupiter:
http://jupyter.readthedocs.io/en/latest/install.html
lectures:
http://nbviewer.jupyter.org/github/jrjohansson/scientific-python-lectures/tree/master/