AxisObjects
Get a AxisObject from the Axis. The object is referred to by index.
AxisObject AxisObjects( int nIndex )
/////////////////////////////////////////////////////// // set X axis bottom ticks show void set_x_axis_bottom_ticks_show(bool bShow=true) { GraphLayer gl = Project.ActiveLayer(); gl.XAxis.AxisObjects(AXISOBJPOS_AXIS_FIRST).BottomTicks.Show.nVal = bShow; } /////////////////////////////////////////////////////// // set X axis top ticks show void set_x_axis_top_ticks_show(bool bShow=true) { GraphLayer gl = Project.ActiveLayer(); gl.XAxis.AxisObjects(AXISOBJPOS_AXIS_SECOND).TopTicks.Show.nVal = bShow; } /////////////////////////////////////////////////////// // set Y axis right labels show void set_y_axis_right_labels_show(bool bShow=true) { GraphLayer gl = Project.ActiveLayer(); gl.YAxis.AxisObjects(AXISOBJPOS_LABEL_SECOND).RightLabels.Show.nVal = bShow; } /////////////////////////////////////////////////////// // nPos = // 0, // default // 1, // percent // 2, // real (scale) // dVal is used to specify a specific percent or real position void set_left_axis_position(int nPos, double dVal) { GraphLayer gl = Project.ActiveLayer(); gl.YAxis.AxisObjects(AXISOBJPOS_AXIS_FIRST).LeftTicks.Position.nVal = nPos; if( nPos > 0 ) gl.YAxis.AxisObjects(AXISOBJPOS_AXIS_FIRST).LeftTicks.Offset.dVal = dVal; } void set_top_axis_color(int nColor) { GraphLayer gl = Project.ActiveLayer(); gl.XAxis.AxisObjects(AXISOBJPOS_AXIS_SECOND).TopTicks.Color.nVal = nColor; } int get_bottom_axis_color() { GraphLayer gl = Project.ActiveLayer(); return gl.XAxis.AxisObjects(AXISOBJPOS_AXIS_FIRST).BottomTicks.Color.nVal; }
origin.h