博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
python3绘图示例3(基于matplotlib:折线图等)
阅读量:2241 次
发布时间:2019-05-09

本文共 641 字,大约阅读时间需要 2 分钟。

#!/usr/bin/env python # -*- coding:utf-8 -*- from pylab import * from numpy import * import numpy # 数据点图-数据点平滑处理 def moveing_average(ineterval,window_size):     window=ones(int(window_size))/float(window_size)     return convolve(ineterval,window,'same') t=linspace(-4,4,100) y=sign(t)+randn(len(t))*0.1 plot(t,y,'k.') y_av=moveing_average(y,10) plot(t,y_av,'r') xlabel('time') ylabel('value') grid(True) show() # 图2-一个为曲线图 一个为折线图 windows=['flat','hanning','hamming','bartlett','blackman'] def smooth(x,window_len=11,window='hanning'):     if x.ndim!=1:         print('ere')     if x.size

转载于:https://www.cnblogs.com/NiceTime/p/10125218.html

你可能感兴趣的文章
oracle
查看>>
泛型与通配符详解
查看>>
BaseServiceImpl中的实现关键点
查看>>
Struts2中的session、request、respsonse获取方法
查看>>
如何理解MVC模型
查看>>
SpringMVC中乱码解决方案
查看>>
SpringMVC中时间格式转换的解决方案
查看>>
post和get请求相关知识点
查看>>
关于try finally 中的return语句的问题
查看>>
RequestBody/ResponseBody处理Json数据
查看>>
springmvc请求参数获取的几种方法
查看>>
在eclipse中创建和myeclipse一样的包结构
查看>>
Java中的IO流
查看>>
java中的关键字
查看>>
如果某个方法是静态的,它的行为就不具有多态性
查看>>
优化Hibernate所鼓励的7大措施
查看>>
Java 8系列之重新认识HashMap
查看>>
HashMap 、 ArrayList、String 重写了equals方法 而Object类(比如User)没有重写
查看>>
Servlet的生命周期
查看>>
Object中的getClass()返回的是当前运行的类
查看>>