ConvertByAxis
It converts values back and forth between the real space and the "screen" space according to the axis scale of the graph layer. It really has effect only if the scale of the needed axis (the argument nAxis) is not linear.
BOOL ConvertByAxis( double * prVals, int nSize, int nAxis, BOOL bForward, double * prValsOptnlDest = NULL )
TRUE if any conversion made, otherwise FALSE. If TRUE is returned, the buffer prVals is left unchanged and prValsOptnlDest (if supplied) is left unchanged.
//Convert vector vY's screen space to real space according Y-axis scale. void GraphLayer_ConvertByAxis_Ex1() { vector vY; vY.Data(1, 32, 1);//fill with data //make sure there exists an active graphlayer, and set y axes type as log10; GraphLayer gl = Project.ActiveLayer(); if ( !gl ) { printf("Can not get active graphlayer!"); return; } gl.ConvertByAxis(vY, vY.GetSize(), OKAXISTYPE_Y, false); return; }
origin.h