【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画自定义 ...
随机推荐
- Windows 10 win 10 切换输入法的快捷键
Windows 10 win 10 切换输入法的快捷键 怎么切换输入法 中文 英文 切换 Windows键 + 空格键 切换输入法 Shift+Alt 切换中英文 Windows键形状如下 ...
- ES6高级技巧(五)
Set 由于Set结构没有键名,只有键值所有keys方法和values方法的行为完全一致 let a=new Set([1,2,3,4]) //a.keys() a.values() 或者直接用of遍 ...
- IDEA Rider使用64位IISExpress(3)
将原来的Programe Files(x86)修改为不带x86的即可.
- Intellij Idea 自动更新资源和类
Run -> Edit Configurations 进入配置页 On update action:当发现更新时的操作 选择Update classes and resources On ...
- IntelliJ idea 撤回(已经commit未push的)操作
VSC => Git => reset head => 退回到上次commit => 退回到第2次提交之前 => 退回到指定commit版本
- 用 ubuntu 自带的 gome-screenshot 来实现类似QQ截图那样的功能,同时设置键盘快捷键
在window下习惯了使用ctrl+Alt+A截图,在linux还真有点不习惯,所以下面介绍一下替代的用法. 打开 ubuntu 的系统设置-->键盘-->快捷键:界面如下: 01 添加一 ...
- SSM基本依赖及配置
需要了解具体配置文件的作用到:SSM基本配置详解 示例项目:SSMDemo 依赖 基本依赖 <properties> <spring.version>5.0.6.RELEASE ...
- 分布式任务调度平台XXL-JOB快速使用与问题总结
1.XXL-JOB简介 XXL-JOB is a lightweight distributed task scheduling framework. It's core design goal is ...
- Storm 系列(九)—— Storm 集成 Kafka
一.整合说明 Storm 官方对 Kafka 的整合分为两个版本,官方说明文档分别如下: Storm Kafka Integration : 主要是针对 0.8.x 版本的 Kafka 提供整合支持: ...
- SpringMVC重要注解 @ControllerAdvice
@ControllerAdvice,是Spring3.2提供的新注解,从名字上可以看出大体意思是控制器增强.让我们先看看@ControllerAdvice的实现: package org.spring ...