【持续更新】

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】使用速记的更多相关文章

  1. python安装numpy、scipy和matplotlib等whl包的方法

    最近装了python和PyCharm开发环境,但是在安装numpy和matplotlib等包时出现了问题,现总结一下在windows平台下的安装方法. 由于现在找不到了工具包新版本的exe文件,所以采 ...

  2. matplotlib 高级用法实例--共享x轴

    http://localhost:8888/notebooks/duanqs/matplotlib_advanced_example.ipynb 我不会弄呀, 刚才从matplotlib文档里吧示例用 ...

  3. Python matplotlib笔记

    可视化的工具有很多,如Tableau,各种JS框架,我个人感觉应该是学JS最好,因为JS不需要环境,每个电脑都有浏览器,而像matplotlib需要Python这样的开发环境,还是比较麻烦的,但是毕竟 ...

  4. Matplotlib——第一章轻松画个图

    首先安装matplotlib,使用pip install matplotlib.安装完成后在python的命令行敲入import matplotlib,如果没问题,说明安装成功可以开始画图了. 看好了 ...

  5. win7系统下python安装numpy,matplotlib,scipy和scikit-learn

    1.安装numpy,matplotlib,scipy和scikit-learn win7系统下直接采用pip或者下载源文件进行安装numpy,matplotlib,scipy时会遇到各种问题,这是因为 ...

  6. 【转】使用Python matplotlib绘制股票走势图

    转载出处 一.前言 matplotlib[1]是著名的python绘图库,它提供了一整套绘图API,十分适合交互式绘图.本人在工作过程中涉及到股票数据的处理如绘制K线等,因此将matplotlib的使 ...

  7. HTML5特性速记图

    今天推荐大家一张HTML5特性速记图,供大家平时查阅,也可以打印放在电脑旁帮助速记.速查.此图笔者收集于网络图片.

  8. Golang语法与代码格式速记【转】

    // Description: Golang语法与代码格式速记 // Author: cxy // Date: 2013-04-01 // Version: 0.3 // TODO 说明 // TOD ...

  9. 【Python数据分析】四级成绩分布 -matplotlib,xlrd 应用

    最近获得了一些四级成绩数据,大概500多个,于是突发奇想是否能够看看这些成绩数据是否满足所谓的正态分布呢?说干就干,于是有了这篇文章.文章顺带介绍了xlrd模块的一些用法和matplotlib画自定义 ...

随机推荐

  1. Vertica性能分析

    Vertica的特点简单的说可以总结为:列存储.MPP架构.技术比较新.列存储本身带来了数据高度压缩的便利,MPP架构使得可以用相对廉价的PC级服务器横向扩展到较大规模(PB级),05年才问世使得它在 ...

  2. python面试题第一份

    阅读目录 1 Python的函数参数传递 2 Python中的元类(metaclass) 3 @staticmethod和@classmethod 4 类变量和实例变量 5 Python自省 6 字典 ...

  3. linux ,查看端口

    netstat -antlp | grep java 注:grep java是过滤所有java进程

  4. ROS源更改

    ROS源更改 配置你的电脑使其能够安装来自 packages.ros.org 的软件,使用国内或者新加坡的镜像源,这样能够大大提高安装下载速度 sudo sh -c '. /etc/lsb-relea ...

  5. [转帖]linux lsof 用法简介

    linux lsof 用法简介 https://www.cnblogs.com/saneri/p/5333333.html 1.简介: lsof(list open files)是一个列出当前系统打开 ...

  6. git 用 diff 来检查改动

    用 diff 来检查改动 项目的开发是由无数个微小的改动组成的.了解项目开发过程的关键就是要搞清楚每一个改动.当然你可以使用 “git status” 命令或更简单的 “git log” 命令来打印出 ...

  7. oracle 10 升级补丁

    Ooacle 10g补丁安装方法 Windows 平台 方法: 1.  备份数据库:关闭数据库,拷贝,安装软件目录,数据文件拷到另一个地方 2.  关闭停止所有oracle 服务+Distribute ...

  8. centos7 配置nginx vim语法高亮

    看了Nginx核心知识100讲,按照他的做法,没有配置成功,可以使用下面的方法: 下载nginx源码,http://nginx.org/en/download.html 这里下载的是:nginx-1. ...

  9. ASP.NET MVC IOC 之 Autofac(三)-webform中应用

    在webform中应用autofac,只有global中的写法不一样,其他使用方式都一样 nuget上引用: global中的写法: private void AutoFacRegister() { ...

  10. Union-Find 并查集算法

    一.动态连通性(Dynamic Connectivity) Union-Find 算法(中文称并查集算法)是解决动态连通性(Dynamic Conectivity)问题的一种算法.动态连通性是计算机图 ...