当前位置:网站首页>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)边栏推荐
- 面试京东 T5,被按在地上摩擦,鬼知道我经历了什么?
- Exercises --- quick arrangement, merging, floating point number dichotomy
- About getter/setter methods
- Cannot start after installing MySQL 5.7.27 in CentOS 7? (Language bash)
- About new_ Online_ Judge_ 1081_ Thoughts on Goldbach's conjecture
- Shell function, system function, basename [string / pathname] [suffix] can be understood as taking the file name in the path, dirname file absolute path, and user-defined function
- 邮件服务器
- Shell process control (emphasis), if judgment, case statement, let usage, for ((initial value; loop control condition; variable change)) and for variable in value 1 value 2 value 3..., while loop
- Excellent Kalman filter detailed article
- Food safety | the more you eat junk food, the more you want to eat it? Please keep this common food calorimeter
猜你喜欢

Anchor Free检测器:CenterNet

Ant高级-task
![[cloud native • Devops] master the container management tool rancher](/img/6f/50deaf053c86486e52d2c2c7310ed2.png)
[cloud native • Devops] master the container management tool rancher

Configuration of pytorch deep learning environment based on cuda10.0

DCGAN论文改进之处+简化代码

Exercises --- quick arrangement, merging, floating point number dichotomy

Mysql database experiment training 5, data query YGGL database query (detailed)

GBase 8a MPP集群扩容实战

Brush the title "sword finger offer" day03

3D修复论文:Shape Inpainting using 3D Generative Adversarial Network and Recurrent Convolutional Networks
随机推荐
Gbase 8A MPP cluster capacity expansion practice
Interview JD T5, was pressed on the ground friction, who knows what I experienced?
Acl2021 best paper released, from ByteDance
文件上传漏洞相关
Shell operator, $((expression)) "or" $[expression], expr method, condition judgment, test condition, [condition], comparison between two integers, judgment according to file permission, judgment accor
Qt 学习(二) —— Qt Creator简单介绍
3D restoration paper: shape painting using 3D generative advantageous networks and recurrent revolutionary networks
面试必备:虾皮服务端15连问
Looking for a job for 4 months, interviewing 15 companies and getting 3 offers
Brush the title "sword finger offer" day03
Data visualization
面试京东 T5,被按在地上摩擦,鬼知道我经历了什么?
3D人脸重建:Joint 3D Face Reconstruction and Dense Alignment with position Map Regression Network
Food safety | the kitchen board environment is very important. Do you know these use details?
PCL各模块概述(1.6)
Review summary of engineering surveying examination
数学推理题:张王李赵陈五对夫妇聚会,见面握手
[scm] source code management - lock of perforce branch
Metaspolit
Robotframework+eclispe environment installation