Limiting the range of an axis
For linear mappings
You might want to limit the range of the drawing. For example, the absolute temperature is always T \ge 0, therefore it might be desired that the T \lt 0 range of the axis cannot be shown.
To realize this, you can utilize the change
events for
min
and/or max
of the corresponding
axis.
In the following example the range of the abscissa is restricted to the interval [-2, 2]. The ordinate has no limitation.
For arbitrary mappings
Unfortunately, the simple example above is applicable only when the
mapping of the axis is
linear
.
If the mapping is logarithmic, for example, it becomes more complicated. In the following example the lower range of the abscissa is limited to 1 (= 10^0) (and no upper limit).
For this purpose you can use
backward()
and
forward()
of KontrastMapping.