博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
matplotlib画图制表
阅读量:4200 次
发布时间:2019-05-26

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

通过 matplotlib 模块, 绘制数据的曲线图

import numpy as npimport matplotlib.pyplot as pltx = np.linspace(0, 10, 1000)y = np.sin(x)plt.figure(figsize=(8, 4))plt.plot(x, y, label="$sin(x)$", color="red", linewidth=2)plt.xlabel("Time(s)")plt.ylabel("Volt")plt.title("PyPlot First Example")plt.ylim(-1.2, 1.2)plt.show()

输入结果:

在这里插入图片描述

转载地址:http://amfli.baihongyu.com/

你可能感兴趣的文章
谷歌获取货币汇率代码
查看>>
安装nginx
查看>>
手动6 - 隐藏Nginx版本号
查看>>
手动7 - nginx 日志切割
查看>>
magento - 使用后台设置的时间用法
查看>>
Linux常用命令
查看>>
清除文件中的.svn文件
查看>>
手动11 -nginx 优化配置
查看>>
php加速器 - zendopcache
查看>>
手动12 - 安装php加速器 Zend OPcache
查看>>
set theme -yii2
查看>>
yii2 - 模块(modules)的view 映射到theme里面
查看>>
yii2 - controller
查看>>
yii2 - 增加actions
查看>>
网站加载代码
查看>>
php图像处理函数大全(缩放、剪裁、缩放、翻转、旋转、透明、锐化的实例总结)
查看>>
magento url中 uenc 一坨编码 base64
查看>>
强大的jQuery焦点图无缝滚动走马灯特效插件cxScroll
查看>>
Yii2.0 数据库查询
查看>>
yii2 db 操作
查看>>