# SetAxisScalingMode

int SetAxisScalingMode (int panelHandle, int controlID, int axis, int axisScaling, double min, double max);

## Purpose

Sets the scaling mode and the range of a graph axis or the range of the y-axis of a strip chart.

This function is not valid for the x-axis of a strip chart. To set the x offset and x increment for a strip chart, use the SetCtrlAttribute function with the ATTR_XAXIS_OFFSET and ATTR_XAXIS_GAIN attributes.

If you use this function to change the y-axis of a strip chart, the chart is cleared and all existing data is discarded.

When calling this function on a digital graph, the min and max values will be rounded to the closest integer value.

## Parameters

Input
Name | Type | Description
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
axis | integer | Specifies for which axis to set the mode and range. The following lists the valid values. VAL_BOTTOM_XAXIS (graphs only) VAL_TOP_XAXIS (graphs only) VAL_LEFT_YAXIS (graphs and strip charts) VAL_RIGHT_YAXIS (graphs only)
axisScaling | integer | Scaling mode for the axis. The following table lists valid values.
VAL_MANUAL | Axis is manually scaled, and min and max define its range.
VAL_AUTOSCALE | Axis is autoscaled. min and max are not used. You cannot use VAL_AUTOSCALE in strip charts.
VAL_LOCK | Axis is manually scaled using the current, usually autoscaled, minimum and maximum values on the axis. You cannot use VAL_LOCK in strip charts.
If axisScaling is VAL_MANUAL, max must exceed min.
min | double-precision | Minimum axis value when you configure the axis for manual scaling. If axisScaling is VAL_MANUAL, max must exceed min. When calling this function on a digital graph, the min value will be rounded to the closest integer value.
max | double-precision | Maximum axis value when you configure the axis for manual scaling. If axisScaling is VAL_MANUAL, max must exceed min. When calling this function on a digital graph, the max value will be rounded to the closest integer value.

## Return Value

Name | Type | Description
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
Code | Error Message String
xx | Success