util/
vis_linear_function.pro
graphics computation
Create a function which maps in_range to out_range with a linear function.
Examples
To create a linear function that maps the x-range of a surface object to the range -0.75 to 0.75 use:
osurface->getProperty, xrange=xr
xc = vis_linear_function(xr, [-0.75, 0.75])
osurface->setProperty, xcoord_conv=xc
osurface->getProperty, xrange=xr
xc = norm_coord(xr)
xr[0] -= 0.5
osurface->setProperty, xcoord_conv
top vis_linear_function
result = vis_linear_function(in_range, out_range [, data=fltarr])
Create a function which maps in_range to out_range with a linear function.
Return value
2-element array of type of in_range and out_range; or scaled data if DATA keyword is present
Parameters
- in_range in required type=2-element numeric array
input range
- out_range in required type=2-element numeric array
output range
Keywords
- data in optional type=fltarr
data to scale
File attributes
Modification date: | Mon Nov 29 18:32:44 2010 |
Lines: | 55 |
Docformat: | rst rst |