当前位置:网站首页>Matlab- draw date and duration diagram
Matlab- draw date and duration diagram
2022-07-27 10:20:00 【User 9925864】
1、 Draw date line chart
With x The axis creates a line chart for the date time value . then , Change the format of the scale label and x Axis range . establish t As a date sequence , establish y As random data . Use plot Function to draw vector graph .
t = datetime(2014,6,28) + calweeks(0:9);
y = rand(1,10);
plot(t,y);By default ,plot The position of the tick mark will be selected according to the data range . When zooming in and out of a drawing , The scale label will automatically adjust according to the coordinate axis range .
xlim(datetime(2014,[7 8],[12 23]))
xtickformat('dd-MMM-yyyy')Draw a duration timeline
With x The axis is the duration value to create a line graph . then , Change the format of the scale label and x Axis range .
establish t As 0 To 3 Seven linearly separated duration values between minutes . establish y As a random data vector . Plot data .
t = 0:seconds(30):minutes(3);
y = rand(1,7);
plot(t,y);see x Axis range . Because the duration scale label is in a single unit ( minute ) It means , Therefore, these ranges are stored in this unit .
xl = xlim
xl = 1x2 duration
-4.5 sec 184.5 secChange the format of the duration scale label , In order to display in the form of a digital timer containing multiple time units .
xtickformat('mm:ss')Look again x Axis range . Because the duration scale label is now expressed in multiple units , So these ranges are 24 Hours a day for storage .
xl = xlim
xl = 1x2 duration
-00:04 03:04Plot a scatter chart with dates and durations
Use scatter or scatter3 The function creates a scatter chart with the date time or duration value as the input value . for example , establish x Scatter chart with axis as date value .
t = datetime('today') + caldays(1:100);
y = linspace(10,40,100) + 10*rand(1,100);
scatter(t,y)边栏推荐
- Introduction to regular expressions of shell, general matching, special characters: ^, $,., * Character range (brackets): [], special characters: \, matching mobile phone number
- Matlab- draw superimposed ladder diagram and line diagram
- Learn typescript (1)
- Ant advanced -path and fileset
- NFT system development - Tutorial
- FSM onehot answer record
- Word2vec principle and application and article similarity (recommended system method)
- How to create a.Net image with diagnostic tools
- Matlab-绘制叠加阶梯图和线图
- How does data analysis solve business problems? Here is a super detailed introduction
猜你喜欢

RobotFramework+Eclispe环境安装篇

Xiandai 004

Visual slam lecture notes (I): Lecture 1 + Lecture 2

Oracle调整数据文件大小杂谈

Leetcode.1260. 2D grid migration____ In situ violence / dimensionality reduction + direct positioning of circular array

hdu5288(OO’s Sequence)

Ant高级-path和fileset
![Shell运算符、$((运算式))” 或 “$[运算式]、expr方法、条件判断、test condition、[ condition ]、两个整数之间比较、按照文件权限进行判断、按照文件类型进行判断](/img/65/a735ca2c2902e3fc773dda79438972.png)
Shell运算符、$((运算式))” 或 “$[运算式]、expr方法、条件判断、test condition、[ condition ]、两个整数之间比较、按照文件权限进行判断、按照文件类型进行判断

Based on LSM tree idea Net 6.0 C # write a kV database (case version)

线代004
随机推荐
Shell integrated application cases, archiving files, sending messages
Introduction to regular expressions of shell, general matching, special characters: ^, $,., * Character range (brackets): [], special characters: \, matching mobile phone number
Matlab-绘制叠加阶梯图和线图
Shell variables, system predefined variables $home, $pwd, $shell, $user, custom variables, special variables $n, $, $*, [email protected],
Matlab的不同进制转换
Shell的正则表达式入门、常规匹配、特殊字符:^、$、.、*、字符区间(中括号):[ ]、特殊字符:\、匹配手机号
Understanding of batchnorm2d() function in pytorch
【英雄哥六月集训】第 28天: 动态规划
使用 Kmeans聚类实现颜色的分割
Shell流程控制(重点)、if 判断、case 语句、let用法、for 循环中有for (( 初始值;循环控制条件;变量变化 ))和for 变量 in 值 1 值 2 值 3… 、while 循环
Discussion on a problem
Oracle view hard parsing
备战金九银十Android面试准备(含面试全流程,面试准备工作面试题和资料等)
hdu5288(OO’s Sequence)
Excellent Kalman filter detailed article
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
Uninstall cuda11.1
Des/3des/aes differences
There is no CUDA option in vs2019+cuda11.1 new project
Program translation and execution, from editing, preprocessing, compilation, assembly, linking to execution