How to use pylab to plot figure()?
2015-07-10 20:11
204 查看
#quote from MIT 'introduction to computation and programming using python, Revised' import pylab principle = 10000 #initial investment interestRate = 0.05 years = 20 values = [] for i in range(years + 1): values.append(principle) principle += principle*interestRate pylab.plot(values) pylab.title('5% Gowth, Compounded Annually') pylab.xlabel('Years of Compounding') pylab.ylabel('Value of Principle($)') pylab.show()
相关文章推荐
- CodeBlocks集成Objective-C开发
- Android拷贝工程不覆盖原工程的配置方法
- Oracle中的函数 字符串、数字、日期
- 那些解读人生的好电影
- Qt button() 与 buttons() 区别
- PHP安全编程:register_globals的安全性 全局变量注册
- 配置openssh服务器(学习整理)
- What is machine learning?
- Ubuntu ADSL拨号上网
- Microsoft Dynamics CRM 2013 试用之 配置联合身份验证服务 Active Directory Federation Services...
- Microsoft Dynamics CRM 2013 试用之 配置联合身份验证服务 Active Directory Federation Services
- 阿里天池大数据之移动推荐算法大赛总结及代码全公布
- AE开发中,对 COM 组件的调用返回了错误 HRESULT E_FAIL,在地理处理中,即GP工具处理时出错
- Ubuntu 14.04安装Cinnamon桌面环境
- Ubuntu14.04安装java
- UI-UIColor-initWithRed:green:blue:alpha:调研
- java jni eclipse javap 函数签名
- Android中Activity的引导方式launcherMode的四种方式。
- java学习之旅53--数组_数组的三种初始化方式
- 40.数组中只出现一次的数字