The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



CalcScalePars


Unit:SDL_math1
Class: None
Declaration: procedure CalcScalePars (Ntick: integer; LowVal, HighVal: extended; var LowTick, Distance: extended; var Divi: word);

The procedure CalcScalePars calculates the label parameters for an axis defined by its lower and upper boundaries (LowVal and HighVal) and the minimum number of ticks expected (NTick). From these parameters the routine calculates the value of the lowest tick (LowTick ) and the distance between the ticks (Distance) in a way that these ticks are always located on numbers within the 1-2-5 scheme. In addition, CalcScalePars returns a proposal for the number of ticks between numeric labels (Divi).

Setting the parameter NTick to a zero value calculates the tick marks to be positioned at integer values (i.e. the both the Distance and the Divi parameters will return 1, the LowTick parameter will be the lowest integer value within the boundaries).


Last Update: 2012-Oct-20