scaleline

scaleline(varargin)

SCALELINE Add a scale bar (with label) to an x- or y-axis; scales with zoom

Usage:

[h_scaleline, h_scalelabel] = scaleline(ax, time) [h_scaleline, h_scalelabel] = scaleline(ax, time, label) [h_scaleline, h_scalelabel] = scaleline(ax, time, label, line_axis) [h_scaleline, h_scalelabel] = scaleline(ax, time, label, line_axis, gap)

Inputs:

ax : axes handle (default: gca) time : double - scale length in plot units – required label : char - label text (default: ‘<time> units’) line_axis : ‘x’ or ‘y’ - which axis the bar attaches to (default: ‘x’) gap : double - gap between bar and axis in normalized units (default: 0.01)

Outputs:

h_scaleline : annotation handle for the scale bar h_scalelabel : annotation handle for the label textbox

See also: annotation, stacked_plot

∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿