当前位置:网站首页>Matlab-绘制日期和持续时间图
Matlab-绘制日期和持续时间图
2022-07-27 09:57:00 【用户9925864】
1、绘制日期线图
以 x 轴为日期时间值来创建线图。然后,更改刻度标签的格式以及 x 坐标轴范围。创建 t 作为日期序列,创建 y 作为随机数据。使用 plot 函数绘制向量图。
t = datetime(2014,6,28) + calweeks(0:9);
y = rand(1,10);
plot(t,y);默认情况下,plot 会根据数据范围选择刻度线位置。当放大和缩小绘图时,刻度标签会根据坐标轴范围自动调整。
xlim(datetime(2014,[7 8],[12 23]))
xtickformat('dd-MMM-yyyy')绘制持续时间线图
以 x 轴为持续时间值来创建线图。然后,更改刻度标签的格式以及 x 坐标轴范围。
创建 t 作为 0 到 3 分钟之间的七个线性分隔的持续时间值。创建 y 作为随机数据向量。绘制数据图。
t = 0:seconds(30):minutes(3);
y = rand(1,7);
plot(t,y);查看 x 坐标轴范围。由于持续时间刻度标签是用单一单位(分钟)表示的,因此这些范围按该单位进行存储。
xl = xlim
xl = 1x2 duration
-4.5 sec 184.5 sec更改持续时间刻度标签的格式,以便以包含多个时间单位的数字计时器形式显示。
xtickformat('mm:ss')再次查看 x 坐标轴范围。由于持续时间刻度标签现在是用多个单位表示的,因此这些范围按 24 小时一天的单位进行存储。
xl = xlim
xl = 1x2 duration
-00:04 03:04用日期和持续时间绘制散点图
使用 scatter 或 scatter3 函数以日期时间或持续时间值为输入值创建散点图。例如,创建 x 轴为日期值的散点图。
t = datetime('today') + caldays(1:100);
y = linspace(10,40,100) + 10*rand(1,100);
scatter(t,y)边栏推荐
- QT learning (II) -.Pro file explanation
- NFT system development - Tutorial
- Shell运算符、$((运算式))” 或 “$[运算式]、expr方法、条件判断、test condition、[ condition ]、两个整数之间比较、按照文件权限进行判断、按照文件类型进行判断
- Ant advanced -path and fileset
- QT learning (II) -- a brief introduction to QT Creator
- LeetCode.565. 数组嵌套____暴力dfs->剪枝dfs->原地修改
- 3D restoration paper: shape painting using 3D generative advantageous networks and recurrent revolutionary networks
- File upload of native input tag
- Decision tree principle and case application - Titanic survival prediction
- 备战金九银十Android面试准备(含面试全流程,面试准备工作面试题和资料等)
猜你喜欢

文件上传漏洞绕过方法
![[cloud native • Devops] master the container management tool rancher](/img/6f/50deaf053c86486e52d2c2c7310ed2.png)
[cloud native • Devops] master the container management tool rancher

线代004

How does data analysis solve business problems? Here is a super detailed introduction

Xiandai 004

3D restoration paper: shape painting using 3D generative advantageous networks and recurrent revolutionary networks

Oracle RAC 19C PDB instance is down

Food safety | the more you eat junk food, the more you want to eat it? Please keep this common food calorimeter

NFT system development - Tutorial

Ant advanced task
随机推荐
Shell函数、系统函数、basename [string / pathname] [suffix] 可以理解为取路径里的文件名称 、dirname 文件绝对路径、自定义函数
Configuration of pytorch deep learning environment based on cuda10.0
Simple use of tflite
01_ Movie recommendation (contentbased)_ Object portrait
Huawei switch dual uplink networking smart Link Configuration Guide
Concurrent Park and unpark description
Intermediate and advanced test questions ": what is the implementation principle of mvcc?
Shell的read 读取控制台输入、read的使用
hdu5288(OO’s Sequence)
文件上传漏洞相关
C # set different text watermarks for each page of word
NVIDIA geforce experience login error: the verifier failed to load. Please check your browser settings, such as the advertisement interceptor (solution)
Excellent Kalman filter detailed article
使用 LSM-Tree 思想基于.NET 6.0 C# 写个 KV 数据库(案例版)
Review of in vivo detection
Pytorch installation (very detailed)
pytorch中对BatchNorm2d()函数的理解
Dcgan paper improvements + simplified code
线代003
GBase 8a MPP集群扩容实战