Matplotlib is hiring a Research Software Engineering Fellow! See discourse for details. Apply by January 3, 2020
matplotlib.mlab¶为与同名的matlab命令兼容而编写的数值python函数。
cohere()csd()detrend()find()griddata()prctile()prepca()psd()rk4()specgram()matlab中不存在但无论如何都有用的函数:
cohere_pairs()rk4()contiguous_regions()cross_from_below()cross_from_above()complex_spectrum()magnitude_spectrum()angle_spectrum()phase_spectrum()detrend_mean()demean()detrend_mean() 除了违约 axis .detrend_linear()detrend_none()stride_windows()stride_repeat()apply_window()NumPyrecord数组的帮助方法集合
见 其他
rec2txt()rec2csv()csv2rec()rec_append_fields()rec_drop_fields()rec_join()recs_join()rec_groupby()rec_summarize()对于rec-viewer函数(e rec2csv),有许多格式对象可以传递到函数中,这些函数将执行诸如颜色负值红色、设置百分比格式和缩放等操作。
示例用法:
r = csv2rec('somefile.csv', checkrows=0)
formatd = dict(
weight = FormatFloat(2),
change = FormatPercent(2),
cost = FormatThousands(2),
)
rec2excel(r, 'test.xls', formatd=formatd)
rec2csv(r, 'test.csv', formatd=formatd)
matplotlib.mlab.FormatBool(**kwargs)[源代码]¶2.2 版后已移除: Matplotlib 2.2中的FormatBool类已弃用,将在3.1中删除。
matplotlib.mlab.FormatDate(**kwargs)[源代码]¶2.2 版后已移除: Matplotlib 2.2中的FormatDate类已弃用,将在3.1中删除。改为使用date.strftime。
matplotlib.mlab.FormatDatetime(**kwargs)[源代码]¶2.2 版后已移除: Matplotlib 2.2中不推荐使用FormatDateTime类,将在3.1中删除该类。请改用datetime.strftime。
matplotlib.mlab.FormatFloat(**kwargs)[源代码]¶基类:matplotlib.mlab.FormatFormatStr
2.2 版后已移除: Matplotlib 2.2中不推荐使用FormatFoat类,将在3.1中删除该类。
matplotlib.mlab.FormatFormatStr(**kwargs)[源代码]¶2.2 版后已移除: Matplotlib 2.2中的FormatFormitStr类已弃用,将在3.1中删除。
matplotlib.mlab.FormatMillions(**kwargs)[源代码]¶基类:matplotlib.mlab.FormatFloat
2.2 版后已移除: Matplotlib 2.2中不推荐使用FormatMillions类,将在3.1中删除该类。
matplotlib.mlab.FormatObj(**kwargs)[源代码]¶基类:object
2.2 版后已移除: Matplotlib 2.2中的FormatObj类已弃用,将在3.1中删除。
matplotlib.mlab.FormatPercent(**kwargs)[源代码]¶基类:matplotlib.mlab.FormatFloat
2.2 版后已移除: Matplotlib 2.2中的FormatPercent类已弃用,将在3.1中删除。
matplotlib.mlab.FormatString(**kwargs)[源代码]¶2.2 版后已移除: Matplotlib 2.2中的FormatString类已弃用,将在3.1中删除。
matplotlib.mlab.FormatThousands(**kwargs)[源代码]¶基类:matplotlib.mlab.FormatFloat
2.2 版后已移除: Matplotlib 2.2中的format数千类已被弃用,将在3.1中删除。
matplotlib.mlab.GaussianKDE(dataset, bw_method=None)[源代码]¶基类:object
用高斯核表示核密度估计。
| 参数: |
|
|---|---|
| 属性: |
|
方法
| kde.评估(分) | (ndarray)在提供的一组点上评估估计的PDF。 |
| KDE(点) | (ndarray)与kde.evaluate相同(分) |
covariance_factor()¶matplotlib.mlab.amap(fn, *args)[源代码]¶2.2 版后已移除: amap函数在matplotlib 2.2中已弃用,将在3.1中删除。请改用numpy.array(list(map(…))。
AMAP(功能,序列 [,序列,…] ->数组。
作品像 map() ,但它返回一个数组。这只是一个方便的速记 numpy.array(map(...)) .
matplotlib.mlab.angle_spectrum(x, Fs=None, window=None, pad_to=None, sides=None)[源代码]¶计算 x . 数据被填充到 pad_to 以及窗口功能 窗口 应用于信号。
| 参数: |
|
|---|---|
| 返回: |
|
参见
complex_spectrum()complex_spectrum() .magnitude_spectrum()angle_spectrum() 返回相应频率的大小。phase_spectrum()phase_spectrum() 返回此函数的未包装版本。specgram()specgram() 可以返回信号中段的角度谱。matplotlib.mlab.apply_window(x, window, axis=0, return_window=None)[源代码]¶沿给定轴将给定的窗口应用于给定的一维或二维数组。
| 参数: |
|
|---|
matplotlib.mlab.base_repr(number, base=2, padding=0)[源代码]¶2.2 版后已移除: Matplotlib 2.2中不推荐使用基_repr函数,将在3.1中删除。
返回的表示形式 数 在任何给定的 base .
matplotlib.mlab.binary_repr(number, max_length=1025)[源代码]¶2.2 版后已移除: 二进制_repr函数在matplotlib 2.2中已被弃用,将在3.1中删除。
返回输入的二进制表示形式 数 作为字符串。
这比使用 base_repr() 底座2。
对于非常大的数字,增加max_length的值。注意,在32位机器上,2*1023是2的最大整数幂,可以转换为python float。
matplotlib.mlab.bivariate_normal(X, Y, sigmax=1.0, sigmay=1.0, mux=0.0, muy=0.0, sigmaxy=0.0)[源代码]¶2.2 版后已移除: Matplotlib 2.2中不推荐使用双变量正态函数,将在3.1中删除。
等形双变量高斯分布 X , Y .
见 bivariate normal 在MathWord上。
matplotlib.mlab.center_matrix(M, dim=0)[源代码]¶2.2 版后已移除: Matplotlib 2.2中的center_matrix函数已弃用,将在3.1中删除。
返回矩阵 M 每行的平均值和单位标准为零。
如果 dim =1操作列而不是行。( dim 与numpy axis kwarg相对。)
matplotlib.mlab.cohere(x, y, NFFT=256, Fs=2, detrend=<function detrend_none>, window=<function window_hanning>, noverlap=0, pad_to=None, sides='default', scale_by_freq=None)[源代码]¶两者之间的一致性 x 和 y . 相干是标准化的交叉光谱密度:
| 参数: |
|
|---|---|
| 返回: |
|
matplotlib.mlab.cohere_pairs(X, ij, NFFT=256, Fs=2, detrend=<function detrend_none>, window=<function window_hanning>, noverlap=0, preferSpeedOverMemory=True, progressCallback=<function donothing_callback>, returnPxx=False)[源代码]¶2.2 版后已移除: scipy.signal.coherence
计算所有对的相干和相位 ij 在 X .
X 是一个 数字样本 * * NUMCOLS*数组
ij 是元组列表。每个元组都是一对进入x列的索引,您要为这些列计算一致性。例如,如果 X 有64列,并且要计算所有非冗余对,请定义 ij AS::
ij = []
for i in range(64):
for j in range(i+1,64):
ij.append( (i,j) )
首选速度超过内存 是可选的bool。默认为true。如果为false,则通过只生成一个而不是两个复杂的缓存数组来限制缓存。如果内存变得很关键,这很有用。即使当 首选速度超过内存 是假的, cohere_pairs() 仍然会比呼叫带来显著的性能提升 cohere() 对于每一对,使用的内存比 首选速度超过内存 是True。在我用43000,64数组覆盖所有非冗余对的测试中, 首选速度超过内存 =true与512MB RAM相比,在1.7GHz Athlon上提供了33%的性能提升 首选速度超过内存 =假。但这两种解决方案都比简单地处理所有可能的配对快10倍以上。 cohere() .
| 返回: |
|
|---|