当前位置:网站首页>Xticks function in MATLAB
Xticks function in MATLAB
2022-06-21 17:40:00 【jk_ one hundred and one】
Catalog
Appoint x Axis scale values and labels
Specify non-uniform x Axis scale value
With 10 Increment for increment x Axis scale value
With Pi Increment for increment x Axis scale value
Change... With duration x Axis scale value .
take x The axis scale value is set back to the default value
Specify... For a specific coordinate area x Axis scale value
xticks The function is to set or query x Axis scale value .
grammar
xticks(ticks)
xt = xticks
xticks('auto')
xticks('manual')
m = xticks('mode')
___ = xticks(ax,___)explain
xticks(ticks) Set up x Axis scale value , These values are x The position of the scale mark displayed on the axis . Appoint ticks Is the increment vector ; for example [0 2 4 6]. This command works on the current coordinate area .
xt = xticks Returns the current as a vector x Axis scale value .
xticks('auto') Set auto mode , Make the coordinate area determined x Axis scale value . If you change the scale value , Then I want to set them back to the default value , You can use this option .
xticks('manual') Set manual mode , take x The axis scale value is frozen at the current value . If you want to keep the current scale value while resizing the coordinate area or adding new data to the coordinate area , You can use this option .
m = xticks('mode') Returns the current x Axis scale value mode :'auto' or 'manual'. By default , The mode is automatic , Unless you specify a scale value or change the mode to manual .
___ = xticks(ax,___) Use ax Specified coordinate area , Instead of using the current coordinate area . Appoint ax As the first input parameter of any of the above Syntax .
Example
Appoint x Axis scale values and labels
Create a line diagram . At value 0、5 and 10 Show x The scale mark of the shaft . Then assign a label to each tick mark .
x = linspace(0,10);
y = x.^2;
plot(x,y)
xticks([0 5 10])
xticklabels({'x = 0','x = 5','x = 10'})
Specify non-uniform x Axis scale value
Along the x Axis in between -5 and 5 The non-uniform values between show the tick marks .MATLAB Mark the scale mark with numerical value .
x = linspace(-5,5);
y = x.^2;
plot(x,y)
xticks([-5 -2.5 -1 0 1 2.5 5])
With 10 Increment for increment x Axis scale value
Along the x Axis to 10 Show tick marks for increments , from 0 Start , stay 50 end .
x = linspace(0,50);
y = sin(x/2);
plot(x,y)
xticks(0:10:50)
With Pi Increment for increment x Axis scale value
Create a line diagram . take x The axis range is specified as 0 To 6π. then , With π Display for increment x The scale mark of the shaft .
x = linspace(0,6*pi);
y = sin(x);
plot(x,y)
xlim([0 6*pi])
xticks(0:pi:6*pi)
MATLAB Mark the scale mark with numerical value . Change the label to display by specifying text for each label π Symbol .
xticklabels({'0','\pi','2\pi','3\pi','4\pi','5\pi','6\pi'})
Change... With duration x Axis scale value .
establish x The axis is a graph of duration values . then , Change the duration value of the tick mark .
t = minutes(0:.5:3);
y = rand(1,7);
plot(t,y)
ticks = minutes(0:.25:3);
xticks(ticks)
take x The axis scale value is set back to the default value
Create a needle chart and specify x Axis scale value . then , take x The axis scale value is set back to the default value .
stem(1:10)
xticks([0 4 6 10])
xticks('auto')
Specify... For a specific coordinate area x Axis scale value
from R2019b Start , have access to tiledlayout and nexttile Function to display block diagram . call tiledlayout Function to create a 2×1 Block diagram layout . call nexttile Function to create a coordinate area object ax1 and ax2. Draw random data into each coordinate area . And then by putting ax2 As xticks The first input parameter of the function is passed , Set the... In the figure below x Axis scale value .
tiledlayout(2,1)
ax1 = nexttile;
plot(rand(3))
ax2 = nexttile;
plot(rand(3))
xticks(ax2,[1 2 3])
Delete x Axis scale mark
Delete the edge by specifying the scale value as an empty array x The scale mark of the shaft .
x = linspace(0,10);
y = sin(x);
plot(x,y)
xticks([])
边栏推荐
- 蓄电池外壳如何执行EN45545防火试验
- Stack growth direction and memory growth direction
- 加速雲原生應用落地,焱融 YRCloudFile 與天翼雲完成兼容性認證
- BFS and DFS
- Accélérer le déploiement de l'application Native Cloud et compléter l'authentification de compatibilité entre Yanrong yrcloudfile et Tianyi Cloud
- 一招教你通过焱融 SaaS 数据服务平台+ELK 让日志帮你做决策
- [Error] ‘vector‘ was not declared in this scope
- 室内膨胀型防火涂料根据BS 476-21 耐火标准测定需要符合几项?
- Matlab中xticks函数
- Accelerate the implementation of cloud native applications, and Yanrong yrcloudfile and Tianyi cloud have completed the Compatibility Certification
猜你喜欢

Bm95 points candy problem

What is the process of en 1101 flammability test for curtains?
![[dataset] |bigdetection](/img/34/245241bcf61dec828a999c751581ca.png)
[dataset] |bigdetection

Pingcap was selected as the "voice of customers" of Gartner cloud database in 2022, and won the highest score of "outstanding performer"

ViT杀疯了,10+视觉Transformer模型详解

不是一流大学毕业,却通过自学软件测试,进了阿里年薪初始22K

module. Exports points to problems

硅橡胶玻纤管EN45545防火试验的难易程度

常见设置模式

Vscade tool
随机推荐
[MySQL learning notes 12] paging query
Characteristic requirements of MES system in sheet metal industry
MySQL 1055错误-this is incompatible with sql_mode=only_full_group_by解决方案
module. Exports points to problems
[MySQL learning notes 14] DQL statement execution sequence
kotlin 注解声明与使用
一招教你通过焱融 SaaS 数据服务平台+ELK 让日志帮你做决策
Fragment与Activity 传值
AS 3744.1标准中提及ISO8191测试,两者测试一样吗?
AttributeError: module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipeline‘
Analysis of 43 cases of MATLAB neural network: Chapter 27 prediction of LVQ Neural Network - face orientation recognition
[Error] ‘vector‘ was not declared in this scope
Chapter V operation bit and bit string
Bm19 looking for peak
Common setting modes
Iso8191 test is mentioned in as 3744.1. Are the two tests the same?
贝叶斯公式的两种理解
[MySQL learning notes 15] user management
Your cache folder contains root-owned files, due to a bug in npm ERR! previous versions of npm which
Ease of fire test for silicone rubber glass fiber pipe en45545