06-03-2010 06:31 PM
I have a requirement of having 10 ticks for the Xand Y axes. The X is easy but I need to trigger an autoscale for the Y axis. I have been using the Picupdate command to do this. The problem is that the Picupdate takes a ”long" time to complete since I have complex plots. Is there another way to trigger an autoscale for just a specific axis?
Jim
here is current code
IF AUTO = 1 THEN
Call GRAPHObjOpen(AxisID) ' Open the Axis object
Call GRAPHObjOpen(D2AxisYObj(axis))
D2AxisyScaleType = "complete automatic"
Call GRAPHObjClose(D2AxisYObj(axis))
Call GRAPHObjClose(AxisID)
call picupdate ' to set the scales
END IF
Call GRAPHObjOpen(AxisID) ' Open the Axis object
Call GRAPHObjOpen(D2AxisYObj(axis))
IF AUTO = 1 THEN
min = D2AXISYBEGIN 'get autoscale values
max = D2AXISYend
ELSE
min = Y_MIN
max = Y_MAX
END IF
D2AxisyScaleType = "manual"
D2AXISyBEGIN = MIN
D2AXISyEND = MAX
D2AxisyDivMode = "linear"
D2AxisyOrigin = MIN
IF ((MAX - MIN) <> 0) THEN
D2AxisyTick = Abs(MAX - MIN) / 10
END IF
D2AxisytickBegin = MIN
Call GRAPHObjClose(D2AxisYObj(axis))
Call GRAPHObjClose(AxisID)
Solved! Go to Solution.
06-04-2010 01:36 AM
Hi Jim,
yes there is a better solution. You can use the command
Call GraphObjScalingUpdate(AxisID) 'Update scaling of selected object
instead of "picupdate".
This command updates the axis system without drawing it. There is no command to update only the Y axis but if the X axis is already manual scaled it will not be touched.
Stefan
06-04-2010 07:54 PM