Draw a line with fixed slope
showslope does not work under recent versions of Matlab - sorry!
showslope(N) drags a line in the current figure with a fixed slope N
(does not work with docked windows; undock your window first!)
Depending of the axis types, the 'slope' N means:
Y = N*X+A for X linear and Y linear
Y = A*X^N for X log and Y log
Y = A*EXP(N*X) for X linear and Y log
Y = A+N*LOG(X) for X log and Y linear (LOG = natural logarithm)
The value N is displayed close to the line. N may also be the string of
any valid Matlab expression (eg, 'pi', '22/7', ...), which will be
displayed close to the line. showslope(N,'nolabel') does not display
the value N in the figure.
H = showslope(..) also returns a handle to the line.
By default, the line is an 'annotation object', ie: it is attached to
the window and not to the figure axes. As a consequence, the line may
be further moved, or may be used for getslope. However, resizing
the window may in some case shift the line, and turning the axes from
lin to log turns a power law to a log law... To avoid these problems,
specify showslope(N,'fix'), which makes the line a real plot object
attached to the figure axes.
getslope, getlineinfo, plotsample.
Published output in the Help browser
2005-2017 EzyFit Toolbox 2.45