Abline: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>WikiAdmin
No edit summary
imported>Scott
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''Purpose'''
===Purpose===


Adds a line on the current axes with a given slope and intercept.
Adds a line on the current axes with a given slope and intercept.


'''Synopsis'''
===Synopsis===


:h = abline(slope,intercept)
:h = abline(slope,intercept)
:h = abline(slope,intercept,...)  %additional linestyle information


:h = abline(slope,intercept,...)  %additional linestyle information
===Description===


'''Description'''
ABLINE draws a line on on an existing axes with a given slope <tt>slope</tt>, and intercept <tt>intercept</tt>. If a 3D plot is shown, <tt>slope</tt> and <tt>intercept</tt> can be 2-element vectors describing the slope and intercept of the line in the y- and z- dimensions. Optional line style information can also be included. For more information on linestyle information, see help on the LINE command. The output <tt>h</tt> is the handle of the plotted line object.


ABLINE draws a line on on an existing axes with a given slope, slope, and intercept, intercept, using the existing x-axis range for values. If a 3D plot is shown, slope and intercept can be 2-element vectors describing the slope and intercept of the line in the y and z dimensions. Optional line style information can also be included. For more information on linestyle information, see the manual page on the line command. The handle of the new line object is returned.
===Examples===


'''Examples'''
abline( 3, -1, 'color', 'r', 'linestyle', '--')


<pre>
abline( 3, -1, \’color\’, \’r\’, \’linestyle\’, \’--\’)
</pre>
plots a dashed red line with a slope of 3 and an intercept of -1 on the axes.
plots a dashed red line with a slope of 3 and an intercept of -1 on the axes.


'''See Also'''
===See Also===


dp, hline, line, vline
[[dp]], [[hline]], [[vline]], [[zline]]

Latest revision as of 14:41, 20 September 2011

Purpose

Adds a line on the current axes with a given slope and intercept.

Synopsis

h = abline(slope,intercept)
h = abline(slope,intercept,...) %additional linestyle information

Description

ABLINE draws a line on on an existing axes with a given slope slope, and intercept intercept. If a 3D plot is shown, slope and intercept can be 2-element vectors describing the slope and intercept of the line in the y- and z- dimensions. Optional line style information can also be included. For more information on linestyle information, see help on the LINE command. The output h is the handle of the plotted line object.

Examples

abline( 3, -1, 'color', 'r', 'linestyle', '--')

plots a dashed red line with a slope of 3 and an intercept of -1 on the axes.

See Also

dp, hline, vline, zline