Ubuntu Python 安装numpy SciPy、MatPlotLib环境
安装
sudo apt-get install python-scipy
sudo apt-get install python-numpy
sudo apt-get install python-matplotlib
测试
- #test plot
- from mpl_toolkits.mplot3d import axes3d
- import matplotlib.pyplot as plt
- from matplotlib import cm
- fig = plt.figure()
- ax = fig.gca(projection='3d')
- X, Y, Z = axes3d.get_test_data(0.05)
- ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
- cset = ax.contour(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
- cset = ax.contour(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
- cset = ax.contour(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm)
- ax.set_xlabel('X')
- ax.set_xlim(-40, 40)
- ax.set_ylabel('Y')
- ax.set_ylim(-40, 40)
- ax.set_zlabel('Z')
- ax.set_zlim(-100, 100)
- plt.show()
- #test numpy
- from numpy import *
- print random.rand(4,4)
- #test scipy
- import numpy as np
- from scipy.stats import beta
- from matplotlib.pyplot import hist, plot, show
- obs = beta.rvs(5, 5, size=2000) # 2000 observations
- hist(obs, bins=40, normed=True)
- grid = np.linspace(0.01, 0.99, 100)
- plot(grid, beta.pdf(grid, 5, 5), 'k-', linewidth=2)
- show()
[[ 0.65980666 0.55674039 0.15432447 0.63885279]
[ 0.77583865 0.78290332 0.31575893 0.12678885]
[ 0.67791378 0.86333224 0.97039675 0.95323786]
[ 0.31306339 0.54107452 0.79611926 0.05306962]]
Ubuntu Python 安装numpy SciPy、MatPlotLib环境的更多相关文章
- ubuntu python 安装numpy,scipy.pandas.....
http://blog.csdn.net/Yakumoyukarilan/article/details/51340358
- Ubuntu下安装Numpy, SciPy and Matplotlib
Python开发环境包含科学计算,需要安装NumPy, SciPy, Matplotlib.其中Matplotlib依赖于Python和NumPy.我们先安装NumPY和SciPy. Matplot ...
- win7系统下python安装numpy,matplotlib,scipy和scikit-learn
1.安装numpy,matplotlib,scipy和scikit-learn win7系统下直接采用pip或者下载源文件进行安装numpy,matplotlib,scipy时会遇到各种问题,这是因为 ...
- [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决
这篇文章主要讲述Python如何安装Numpy.Scipy.Matlotlib.Scikit-learn等库的过程及遇到的问题解决方法.最近安装这个真是一把泪啊,各种不兼容问题和报错,希望文章对你有所 ...
- Linux入门(10)——Ubuntu16.04使用pip3和pip安装numpy,scipy,matplotlib等第三方库
安装Python3第三方库numpy,scipy,matplotlib: sudo apt install python3-pip pip3 install numpy pip3 install sc ...
- 在windows下python,pip,numpy,scipy,matplotlib的安装
系统:win7(64bit) 如果只需要安装python,执行步骤一就可以了,不用管后面.如果还需要其它的库,则只需要执行第二步,第一步可省略(因为在安装anaconda的时间,python就自动装好 ...
- win7 64+python2.7.12安装numpy+scipy+matplotlib+scikit-learn
python包下载网址 http://www.lfd.uci.edu/~gohlke/pythonlibs/ 1.已经安装python2.7.12,查看scripts里是否有pip.2.7.9版本以上 ...
- Python安装Numpy,matplotlib库
<1> Numpy是一款基于python的功能强大的科学计算包.要安装numpy首先你得先安装python. python的安装非常简单,本人安装的是python2.7 具体安装步骤如下: ...
- mac安装numpy,scipy,matplotlib
SaintKings-Mac-mini:~ saintking$ python Python ( , ::) [GCC Compatible Apple LLVM (clang-)] on dar ...
随机推荐
- js冒泡法和数组转换成字符串
js代码: window.onload = function(){ var mian = document.getElementById( "mian" ); var mian1 ...
- Android 再按一次退出应用的代码
private long exitTime = 0; @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (key ...
- 开源微内核seL4
微内核 越大的系统潜在的bug就越多.所以微内核在降低bug方面非常有优势,seL4是世界上最小的内核之中的一个.可是seL4的性能能够与当今性能最好的微内核相比. 作为微内核,seL4为应用程序提供 ...
- 谁占用了我的Buffer Pool?--【转】
转自:http://blogs.msdn.com/b/apgcdsd/archive/2011/01/11/buffer-pool.aspx 我在做SQL Server 7.0技术支持的时候有客户问我 ...
- TFS创建登录用户并连接TFS
简单使用 1.创建TFS组(Windows的组) 2.在“TFS管理控制台”中设置“组成员资格” 3.给“Team Foundation Administrators”组设置“属性” 4.给“Team ...
- jquery 属性操作 attr( ) prop()css( )区别
一 attr () 和 prop( ) 操作属性 谈谈我的总结: 1 2 1 属性的定义,根据W3C手册所述:属性包括,标准属性:id class style title 语言属性 lang dir以 ...
- 三维模型 DAE 导出格式结合 OpenGLES 要素浅析
三维模型 DAE 导出格式结合 OpenGLES 要素浅析 太阳火神的漂亮人生 (http://blog.csdn.net/opengl_es) 本文遵循"署名-非商业用途-保持一致&quo ...
- HDU 1695 GCD(容斥定理)
GCD Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submis ...
- Leetcode Copy List with Random Pointer(面试题推荐)
给大家推荐一道leetcode上的面试题,这道题的详细解说在<剑指offer>的P149页有思路解说.假设你手头有这本书.建议翻阅. 题目链接 here A linked list is ...
- JSON对象和JSON字符串以及JSON.parse 函数的使用
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...