To make plot with XYRange
DataPlot MakePlot( GraphLayer & gl, TreeNode & trPlottingInfo = NULL, int nIndex = 0 )
DataPlot MakePlot( XYRange & rgSrc, TreeNode & trPlottingInfo = NULL, int nIndex = 0 )
DataPlot to be created
EX1
// This example assumes a worksheet with three columns is the active layer // Draw a dataplot with the XYRange. void XYRange_MakePlot_Ex1() { Worksheet wks; wks= Project.ActiveLayer(); XYRange xyData; if( wks ) { xyData.Add("X", wks, 0, 0, -1, 0); xyData.Add("Y", wks, 0, 1, -1, 1); xyData.Add("ED", wks, 0, 2, -1, 2); GraphPage gp; gp.Create(); GraphLayer gl; gl = gp.Layers(0); int nIndex = 0; DataPlot dp = xyData.MakePlot(gl,NULL, nIndex); gl.Rescale(); } }
origin.h