标签点

버전4.1.1(47.9 kb)작성자: 亚当·丹兹(Adam Danz)
给定x和y值和标签数组中的图中自动标记图中的点。

다운로드:12.3k

업데이트::2020/1/26

라이선스보기

편집자 메모:This file was selected as MATLAB Central选择一周

[重大更新,即将推出其他功能;不要忘记遵循此文件。]

Given vectors of x-values, y-values, and a vector of label names, lablepoints.m will automatically place all labels appropriately in the plot and output their handles. This function streamlines matlab's builtin text() function and greatly increases its flexibility.

XPOS = [1,2,3,4];ypos = [1,4,1,5];标签= {'lancaster','cincinnati','sofia','rochester'}
h = labelpoints (xpos, ypos, labels)

(optional) Choose where you want your label relative to the data point using initials of compass directions (N, S, E, W, NE, NW, SE, SW, Center).
h = labelpoints(xpos,ypos,标签,'n')

(optional) Add (or subtract) extra space between data points and labels by using a buffer between 0:1
h = labelPoints(xpos,ypos,标签,'n',0.15)

(optional) Decide whether or not the axis limits should automatically adjust if a label falls out of the axis limits (0/1)
h = labelPoints(xpos,ypos,标签,'n',0.15,1)

(optional) Let labelpoints.m identify and label only the outliers in your data. Several outlier methods are available (see help labelpoints)
- Identify and label outliers that are N standard deviations from the mean
- Identify and label outliers that are greater than N times the interquartile range
- 识别并标记在给定界内或外部的异常值
- 识别和标记来自数据线性拟合的高残差的异常值。

(optional) Easily place texts in a list stacked downward, upward, to the left or right.
h = labelpoints(xpos,ypos,标签,'n,“堆叠”,“ down”)

(可选)旋转所有标签
h = labelpoints (xpos, ypos, labels, 'rotation', 45)

(可选)指定所有标签的字体尺寸和颜色
h = labelpoints(xpos,ypos,标签,'fontsize',12,'颜色','r')

帮助部分包括许多用途示例,这些示例展示了带有数字,字符串和符号的标签。如示例所示,此功能非常灵活。只有三个所需的输入,3个可选输入和几个可选参数,以提高灵活性。异常值选项可能需要Stats工具箱。

인용양식

亚当·丹兹(Adam Danz)(2022).标签点(//www.tianjin-qmedu.com/matlabcentral/fileexchange/46891-labelpoints),matlab中央文件交换。검색됨

MATLAB릴리스 호환 정보
개발 환경: R2016a
모든릴리스와호환
플랫폼호환성
Windows 苹果系统 Linux

社区寻宝

在Matlab Central中找到宝藏,发现社区如何为您提供帮助!

Start Hunting!