【Matplotlib】使用速记
【持续更新】
pyplot
matplotlib.pyplot is a state-based interface to matplotlib. It provides a MATLAB-like way of plotting.
画图。常用:
import matplotlib.pyplot as plt
specgram
直接输入原始数据,可以画频谱图。
matplotlib.pyplot.specgram(x, NFFT=None, Fs=None, Fc=None, detrend=None, window=None, noverlap=None, cmap=None, xextent=None, pad_to=None, sides=None, scale_by_freq=None, mode=None, scale=None, vmin=None, vmax=None, *, data=None, **kwargs)
|
input parameters |
x | 1-D array or sequence 数组或序列 |
| Fs | scalar 标量. The default value is 2. | |
| window | callable or ndarray | |
| sides | {'default', 'onesided', 'twosided'} | |
| pad_to | 执行TTF填充的点数,默认none,此时等于NFFT。 | |
| NFFT | FFT点数,2的指数最好,默认值256。不能被用作zero padding。可以用pad_to代替。 | |
| detrend | {'none', 'mean', 'linear'} or callable, default 'none' | |
| scale_by_freq |
{bool, optional}. The default is True for MATLAB compatibility. The parameters detrend and scale_by_freq do only apply when mode is set to ‘psd’. |
|
| mode | {'default', 'psd', 'magnitude', 'angle', 'phase'}. Default is 'psd'. | |
| scale | {'default', 'linear', 'dB'} | |
| cmap | A matplotlib.colors.Colormap instance; if None, use default determined by rc |
|
| xextent | None or (xmin, xmax) |
|
output parameters |
spectrum | 2-D array. Columns are the periodograms of successive segments. |
| freqs | 1-D array. The frequencies corresponding to the rows in spectrum. | |
| t | 1-D array. The times corresponding to midpoints of segments (i.e., the columns in spectrum). | |
| im | instance of class AxesImage . The image created by imshow containing the spectrogram |
Compute and plot a spectrogram of data in x. Data are split into NFFT length segments and the spectrum of each section is computed. The windowing function window is applied to each segment, and the amount of overlap of each segment is specified with noverlap. The spectrogram is plotted as a colormap (using imshow).
colormap
https://matplotlib.org/tutorials/colors/colormaps.html
【Matplotlib】使用速记的更多相关文章
- python安装numpy、scipy和matplotlib等whl包的方法
最近装了python和PyCharm开发环境,但是在安装numpy和matplotlib等包时出现了问题,现总结一下在windows平台下的安装方法. 由于现在找不到了工具包新版本的exe文件,所以采 ...
- matplotlib 高级用法实例--共享x轴
http://localhost:8888/notebooks/duanqs/matplotlib_advanced_example.ipynb 我不会弄呀, 刚才从matplotlib文档里吧示例用 ...
- Python matplotlib笔记
可视化的工具有很多,如Tableau,各种JS框架,我个人感觉应该是学JS最好,因为JS不需要环境,每个电脑都有浏览器,而像matplotlib需要Python这样的开发环境,还是比较麻烦的,但是毕竟 ...
- Matplotlib——第一章轻松画个图
首先安装matplotlib,使用pip install matplotlib.安装完成后在python的命令行敲入import matplotlib,如果没问题,说明安装成功可以开始画图了. 看好了 ...
- win7系统下python安装numpy,matplotlib,scipy和scikit-learn
1.安装numpy,matplotlib,scipy和scikit-learn win7系统下直接采用pip或者下载源文件进行安装numpy,matplotlib,scipy时会遇到各种问题,这是因为 ...
- 【转】使用Python matplotlib绘制股票走势图
转载出处 一.前言 matplotlib[1]是著名的python绘图库,它提供了一整套绘图API,十分适合交互式绘图.本人在工作过程中涉及到股票数据的处理如绘制K线等,因此将matplotlib的使 ...
- HTML5特性速记图
今天推荐大家一张HTML5特性速记图,供大家平时查阅,也可以打印放在电脑旁帮助速记.速查.此图笔者收集于网络图片.
- Golang语法与代码格式速记【转】
// Description: Golang语法与代码格式速记 // Author: cxy // Date: 2013-04-01 // Version: 0.3 // TODO 说明 // TOD ...
- 【Python数据分析】四级成绩分布 -matplotlib,xlrd 应用
最近获得了一些四级成绩数据,大概500多个,于是突发奇想是否能够看看这些成绩数据是否满足所谓的正态分布呢?说干就干,于是有了这篇文章.文章顺带介绍了xlrd模块的一些用法和matplotlib画自定义 ...
随机推荐
- 【Oracle】重做undo表空间
重做undo表空间 场景: alert日志,报了如下错误: [oraprod@arpinfo bdump]$ tail -f alert_PROD.log Errors in file /ora115 ...
- POJ 1146 ID Codes 用字典序思想生成下一个排列组合
ID Codes Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 7644 Accepted: 4509 Descript ...
- 024 如何让html引用公共的头部和尾部(多个html文件公用一个header.html和footer.html)
前端静态html页面,封装公共的头文件(header:顶部页眉,顶部导航栏等部分)和尾部文件(footer:CopyRight.友情链接等部分) 当前方法:通过load()函数,引入公共头部和尾部文件 ...
- 自动化部署Ruby on Rails应用(docker + jenkins)
docker安装参考链接docker官网jenkins中文官网 我的博客网站已经迁移到了https://johnnyting.github.io/,如果有兴趣的可以关注下.下面文章格式可能有点乱,可以 ...
- R语言dai xie
R语言,Python长期招代写,作业量充足,需要一定英文能力,价格满意.有意者请留言联系,谢谢
- Git 核心概念
原文链接 Git的核心概念 聪聪的个人网站 本文不是Git使用教学篇,而是偏向理论方面,旨在更加深刻的理解Git,这样才能更好的使用它,让工具成为我们得力的助手. 版本控制系统 Git 是目前世界上最 ...
- 浅析libuv源码-node事件轮询解析(2)
上一篇讲了轮询的边角料,这篇进入正题.(竟然真有人看我博客,上两个图给你们整理下思路) 这是轮询总流程图. 下图为本节内容简图. Poll for I/O The loop blocks for I/ ...
- What are regsvr32, regasm and gacutil using for?(转载)
What are regsvr32, regasm and gacutil using for? Regasm.exe is used to create COM Callable Wrapper ( ...
- vs 发版时,在发版的文件夹中,找不到应该有的某个文件
检查:VS中,这个文件右击属性,查看生成操作.如果是“无”,改为“内容”.再重新发布就没问题了. 想看发版出来的内容包括哪些,可以从“发布”--“应用程序文件”查看
- Web API 2 的操作结果
这是msdn原文文档!明天用,留存. Web API 控制器操作可以返回以下任何内容: void HttpResponseMessage IHttpActionResult 其他类型 根据返回的这种情 ...