LayerAutoScale¶
LayerAutoScale scales the diagram axes depending on the the data range of the diagram’s datasets.
-
bool = LayerAutoScale(hLayer)
-
bool = LayerAutoScale(hLayer, ssAxis)
-
bool = LayerAutoScale(hLayer, ssAxis, nTicks)
-
bool = LayerAutoScale(hLayer, ssAxis, nTicks, bOnlyForXRange)
Return Value
If the function succeeds, the return value is TRUE (1); otherwise it is FALSE (0).
Parameters
-
hLayer
Identifies the layer.
-
ssAxis
ssAxis is a scalar string with the value “X”, “Y” or “Z”, depending on which axis should be rescaled.
-
nTicks
nTicks is the number of major ticks in the range 2 to 50.
-
bOnlyForXRange
If bOnlyForXRange is TRUE (1), only the y axis is scaled for the selected x-axis range. If nTicks is set to 0, the number of labels will be calculated automatically. Set ssAxis to the value “Y”.
Comment
If the function is called with one parameter, all axes are scaled and between 6 and 11 ticks are calculated for each axis. The function returns FALSE (0), if the axis is scaled logarithmically.
Before this function is called the layer should be added to a document. (see PageAddLayer).
History
Version | Description |
---|---|
R2013.5 | New parameter bOnlyForXRange. |
4.2.7 | Function can be invoked with one parameter (copy constructor). The copy constructor will not copy datasets or drawing objects. |
See also
Overview Diagrams, LayerCreate, LayerSetLabelNum, PageAddLayer
id-620231