matplotlib 绘图
摘要:大致步骤是:import matplotlib.pyplot as pltimport numpy as npx = np.linspace(0, 5, 10)y = x**2# 首先,需要一个figure对象fig = plt.figure()# 然后,axes对象,在axes上面绘图axes = fig.add_axes([0.1, 0.1, 0.8, 0.8])axes.plot(x, y, 'r')axes.set_xlabel('x')axes.set_ylabel('y')axes.set_title('title')
阅读全文
posted @
2013-09-05 21:29
maxc01
阅读(398)
推荐(0)
python计算
摘要:线性回归from scipy import statsimport numpy as npx = np.random.random(10)y = np.random.random(10)slope, intercept, r_value, p_value, std_err = stats.linregress(x,y)# slope 斜率# intercept 截距
阅读全文
posted @
2013-08-30 19:18
maxc01
阅读(255)
推荐(0)