plotScalingInfo – Add scaling / dimensioning arrow to plot

版本 1.1.0 (2.6 KB) 作者: Daniel Frisch
Draws a true to scale arrow that shows the scaling. Useful when y axis tick labels are to be omitted.
26.0 次下载
更新时间 2020/11/14

查看许可证

plotScalingInfo – Add scaling / dimensioning arrow to plot

Draws a true to scale arrow that shows the scaling. Useful when y axis tick labels are to be omitted.

This function adds a scaling information to a plot.
The arguments are property-value pairs.
All of them are optional; default values will be used then.

Use cases:
- Plot many channels vertically stacked (non-overlapping) as with plotECG()
- y axis has no natural origin (zero), only differences matter
- want to omit y axis ticks & tick labels for more clarity

Attention: The scaling information does not update if you zoom the axes!
The position of the scaling information is fixed in normalized units relative to the figure.

Properties:
'Axes' : Axes handle (default: gca)
'Size' : Size of the scaling info relative to axis data units (default: 1)
'String' : Information string (default: '')
'Position' : (1 x 2) vector with the position relative to axes: [x,y] (default: [0.97,0.12])
'HeadSize' : (1 x 2) vector with the rectangular head size: [width,length] (default: [15,1])
'LineWidth' : Line width (default: 2)
'Color' : Line color (default: 'black')
'FontSize' : Font size (default: 20)

Output arguments:
- hnd(1) : handle of doublearrow annotation
- hnd(2) : handle of textarrow annotation

Usage example:
>> figure; plot(1:10)
>> hnd = plotScalingInfo('Size',5, 'String','5mV', 'Position',[0.9,0.2]);
>> hnd(2).VerticalAlignment = 'top';

引用格式

Daniel Frisch (2024). plotScalingInfo – Add scaling / dimensioning arrow to plot (https://www.mathworks.com/matlabcentral/fileexchange/82818-plotscalinginfo-add-scaling-dimensioning-arrow-to-plot), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2020b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.1.0