【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画自定义 ...
随机推荐
- sql server 索引优化
查询实际执行计划,看走的是那种查询 要根据需求,建立合适的索引 经常需要汇总的,可以建立包含索引 --drop index ix_smssend_created on smssent_1 ; crea ...
- oracle数据库安装过程中的疑惑—该记录是本人以前写在微博上的文章
转行IT初学者关于oracle数据库整理第一次安装数据库的时候都是按照操作步骤一步一步进行安装,并没有对操作步骤产生过怀疑或者为什么要这么进行操作?2017年12月8日再次阅读安装操作说明书的时候有了 ...
- CountDownLatch 一个复杂的例子
CountDownLatch复杂点的例子 public class CountDownLatchTest2 { private static Random random = new Random(Sy ...
- 一个简单 System.Threading.Tasks.Dataflow.TransformBlock 示例
直接贴代码了: using System; using System.Collections.Generic; using System.IO; using System.Threading.Task ...
- Prometheus 安装Alertmanager集成
Prometheus 安装Alertmanager集成 # 下载地址 地址1:https://prometheus.io/download/ 地址2:https://github.com/promet ...
- ******可用 SpringBoot 项目打包分开lib,配置和资源文件
spring-boot多模块打包后,无法找到其他模块中的类https://blog.csdn.net/Can96/article/details/96172172 关于SpringBoot项目打包没有 ...
- c#语法复习总结(2)-数据类型
C#数据类型可以分值类型和引用类型.值类型,先说说一个概念 c#栈和堆. 一,栈和堆. 堆:在c里面叫堆,在c#里面其实叫托管堆.为什么叫托管堆,我们往下看. 栈:就是堆栈,因为和堆一起叫着别扭,就简 ...
- C# HttpWebRequest和WebClient的区别 通过WebClient/HttpWebRequest实现http的post/get方法
一 HttpWebReques1,HttpWebRequest是个抽象类,所以无法new的,需要调用HttpWebRequest.Create();2,其Method指定了请求类型,这里用的GET,还 ...
- PIE SDK Alpha通道数据渲染
1. 功能简介 在计算机图形学中,一个RGB颜色模型的真彩图形,用由红.绿.蓝三个色彩信息通道合成的,每个通道用了8位色彩深度,共计24位,包含了所有彩色信息.为实现图形的透明效果,采取在图形文件的 ...
- 处理 unassigned shard
#查看所有分片 GET _cat/shards curl 10.1.2.2:9200/_cat/indices/iis_log* #查看索引的分片状态 #查看第一个unassigned shard的 ...