DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

DIADEM Y AXIS AUTOSCALE METHOD?

Solved!
Go to solution

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)
 

0 Kudos
Message 1 of 3
(3,973 Views)

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

 

 

0 Kudos
Message 2 of 3
(3,967 Views)
Solution
Accepted by topic author Jim West
Thank you for the tip-Why can't I ever find these things? Jim
0 Kudos
Message 3 of 3
(3,950 Views)