lm_plot¶
- lm_plot(varargin)¶
LM_PLOT Plot linear regression results with an annotation textbox
- Usage:
tbox = lm_plot(mdl) tbox = lm_plot(ax, mdl) tbox = lm_plot(…, ‘Display’, value, ‘Location’, value)
- Inputs:
ax : axes handle - target axes (default: gca) mdl : LinearModel - model to plot – required
- Name-Value Pairs:
‘Display’ : char - ‘coeffs’ or ‘full’ (default: ‘full’) ‘Location’ : char - ‘northwest’, ‘northeast’, ‘southwest’,
‘southeast’, or ‘center’ (default: ‘southwest’)
- Outputs:
tbox : handle to the annotation textbox
Example
x = rand(1,1000)*10; z = -3*x + 23 + randn(size(x))*2; mdl = fitlm(table(z’, x’), ‘Var1 ~ Var2’); lm_plot(mdl, ‘Location’, ‘southwest’);
See also: fitlm, annotation, plotAdded
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿