./
abline.pro
topabline
plotting
abline, a, b [, xrange] [, NPOINTS=NPOINTS] [, _EXTRA=_EXTRA]
overplot a line on a plot from the slope and intercept
Parameters
- a in required
the slope of the line
- b in required
the y-intercept
- xrange in optional
element array of the xrange over which to overplot
Keywords
- NPOINTS in optional
set the number of points in the oplot. Default 20
- _EXTRA in optional
anything else to oplot
Examples
x=findgen(100)
y=x+randomn(seed, 100)*3
a=regress(x, y, const=b)
plot, x, y, psym=1
abline, a, b, [20,75] ;
Author information
- History:
Tue Jan 22 17:27:58 2008, Brian Larsen written and tested
Statistics
| Lines: | 19 |
| McCabe complexity: |
File attributes
| Modifcation date: | Tue Sep 9 14:10:50 2008 |
| Lines: | 64 |
![[attach.png]](idldoc-resources/attach.png)