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
更新 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