pyplotpython_python pyplot 和 Pylab 数据显示

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).

Thepylab

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.

简单点说就是pylab组合了pyplot和numpy,这样在这一个包里面就可以做计算和画图。而pyplot只是用来画图。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值