|
Build a scale width major and minor divisions If no fixed step width is specified or if it is set to 0, the major step width will be calculated automatically according to the the value of maxMajSteps. The maxMajSteps parameter has no effect if a fixed step size is specified. The minor step width is always calculated automatically.
If the step width is to be calculated automatically, the algorithm tries to find reasonable values fitting into the scheme {1,2,5}*10^n with an integer number n for linear scales.
For logarithmic scales, there are three different cases
-
If the major step width is one decade, the minor marks will fit into one of the schemes {1,2,...9}, {2,4,6,8}, {2,5} or {5}, depending on the maxMinSteps parameter.
-
If the major step size spans more than one decade, the minor step size will be {1,2,5}*10^n decades with a natural number n.
-
If the whole range is less than one decade, a linear scale division will be built.
- Parameters:
-
x1 | first boundary value |
x2 | second boundary value |
maxMajSteps | max. number of major step intervals |
maxMinSteps | max. number of minor step intervals |
log | logarithmic division (true/false) |
step | fixed major step width. Defaults to 0.0. |
ascend | if true, sort in ascending order from min(x1, x2) to max(x1, x2). If false, sort in the direction from x1 to x2. Defaults to true. |
- Returns:
- True if the arrays have been allocated successfully.
- Warning:
- For logarithmic scales, the step width is measured in decades.
|