external/CDAWlib/
loglevels.pro
NAME: LOGLEVELS (function) PURPOSE: Compute default values for logarithmic axis labeling or contour levels. For a range from 1 to 100 these would be 1., 2., 5., 10., 20., 50., 100. If the range spans more than (usually) 3 decades, only decadal values will be returned unless the /FINE keyword is set. CATEGORY: Tools CALLING SEQUENCE: result = LOGLEVELS([range | MIN=min,MAX=max] [,/FINE] [,COARSE=dec]) INPUTS: RANGE -> A 2-element vector with the minimum and maximum value to be returned. Only levels _within_ this range will be returned. If RANGE contains only one element, this is interpreted as MAX and MIN will be assumed as 3 decades smaller. RANGE superseeds the MIN and MAX keywords. Note that RANGE must be positive definite but can be given in descending order in which case the labels will be reversed. KEYWORD PARAMETERS: MIN, MAX -> alternative way of specifying a RANGE. If only one keyword is given, the other one is computed as 3 decades smaller/larger than the given parameter. RANGE superseeds MIN and MAX. /FINE -> always return finer levels (1,2,5,...) COARSE -> the maximum number of decades for which LOGLEVELS shall return fine labels. Default is 3. (non-integer values are possible). OUTPUTS: A vector with "round" logarithmic values within the given range. The original (or modified) RANGE will be returned unchanged if RANGE does not span at least one label interval. The result will always contain at least two elements. SUBROUTINES: none REQUIREMENTS: none NOTES: If COARSE is lt 0, the nearest decades will be returned instead. The result will always have at least two elements. If COARSE forces decades, the result values may be out-of- range if RANGE spans less than a decade. Caution with type conversion from FLOAT to DOUBLE !! EXAMPLE: range = [ min(data), max(data) ] c_level = LOGLEVELS(range) contour,...,c_level=c_level MODIFICATION HISTORY: mgs, 17 Mar 1999: VERSION 1.00
Routines
File attributes
Modification date: | Tue Oct 21 13:53:48 2014 |
Lines: | 67 |