numpy,scipy,matplotlib,pylab,pyplot 杂记
2014-12-21 11:00
555 查看
pyplot and pylab is a part of module matplotlib.
numpy is one of dependencies of matplotlib.
scipy depend on numpy.
but matplotlib have no relation with scipy.
Matplotlib is the whole package; pylab is a module in matplotlib that gets installed alongsidematplotlib;
and matplotlib.pyplot is
a module in matplotlib.
Pyplot provides the state-machine interface to the underlying plotting library in matplotlib. This means that figures and axes are implicitly and automatically created to achieve the desired plot. For example, calling plot from pyplot will automatically create
the necessary figure and axes to achieve the desired plot. Setting a title will then automatically set that title to the current axes object:
Pylab combines the pyplot functionality (for plotting) with the numpy functionality (for mathematics and for working with arrays) in a single namespace, making that namespace (or environment) even more MATLAB-like. For example, one can call the sin and cos
functions just like you could in MATLAB, as well as having all the features of pyplot.
The pyplot interface is generally preferred for non-interactive plotting (i.e., scripting). The pylab
interface is convenient for interactive calculations and plotting, as it minimizes typing. Note that this is what you get if you use the ipython shell with the -pylab option, which imports everything from pylab and makes plotting fully interactive.
things above all is from the link :stackoverflow
we always use plt as the alias of matplotlib.pyplot
matplotlib has a number of dependencies ,among them numpy which it imports under the common aliasnp
Sympols from matplotlib are available under the mpl alias
regularily,we treat sp as the alias of
scipy.
numpy is one of dependencies of matplotlib.
scipy depend on numpy.
but matplotlib have no relation with scipy.
Matplotlib is the whole package; pylab is a module in matplotlib that gets installed alongsidematplotlib;
and matplotlib.pyplot is
a module in matplotlib.
Pyplot provides the state-machine interface to the underlying plotting library in matplotlib. This means that figures and axes are implicitly and automatically created to achieve the desired plot. For example, calling plot from pyplot will automatically create
the necessary figure and axes to achieve the desired plot. Setting a title will then automatically set that title to the current axes object:
Pylab combines the pyplot functionality (for plotting) with the numpy functionality (for mathematics and for working with arrays) in a single namespace, making that namespace (or environment) even more MATLAB-like. For example, one can call the sin and cos
functions just like you could in MATLAB, as well as having all the features of pyplot.
The pyplot interface is generally preferred for non-interactive plotting (i.e., scripting). The pylab
interface is convenient for interactive calculations and plotting, as it minimizes typing. Note that this is what you get if you use the ipython shell with the -pylab option, which imports everything from pylab and makes plotting fully interactive.
things above all is from the link :stackoverflow
we always use plt as the alias of matplotlib.pyplot
matplotlib has a number of dependencies ,among them numpy which it imports under the common aliasnp
Sympols from matplotlib are available under the mpl alias
regularily,we treat sp as the alias of
scipy.
>>> import numpy as np >>> import scipy as sp >>> import matplotlib as mpl >>> import matplotlib.pyplot as plt
<pre name="code" class="python">>>> import pylab as pl
相关文章推荐
- python3.5下安装numpy,scipy,sklearn,pandas,matplotlib,jieba,requests
- ubuntu16.10安装numpy, scipy, matplotlib
- windows下python配置numpy、matplotlib、scipy
- numpy,scipy,matplotlib配置教程
- Numpy, Pandas, Matplotlib, Scipy 初步
- centos6.4 下安装numpy、scipy、matplotlib
- 在Windows Python3.4 上安装NumPy、Matplotlib、SciPy和IPython
- python、numpy、scipy、matplotlib的一些小技巧
- python install numpy+scipy+matplotlib
- linux下安装Numpy,scipy,matplotlib的安装
- Eclipse+Pydev+numpy+scipy+matplotlib
- Python中的Numpy、SciPy、MatPlotLib安装与配置
- Python中的Numpy、SciPy、MatPlotLib安装与配置
- Numpy快速入门教程(三):SciPy,Matplotlib
- 在win7下安装python开发环境和numpy,scipy,matplotlib模块的问题
- matplotlib绘图实例:pyplot、pylab模块及作图参数
- Numpy、SciPy、MatPlotLib在Python2.7.9下的安装与配置
- Ubuntu-Python2.7安装 scipy,numpy,matplotlib
- Python 下载并安装numpy matplotlib scipy
- matplotlib绘图实例 pyplot、pylab模块及作图参数