GetPlot
Get a dataplot generated from this datarange
BOOL GetPlot(DataPlot& dp, int nIndex = 0, int* pr1 = NULL, int* pr2 = NULL)
TRUE if success
//Get a dataplot generated from XYRange dr. void XYRange_GetPlot_Ex1() { //assume the active workbook a sheet and has least two columns before run this code. Worksheet wks = Project.ActiveLayer(); if ( !wks ) { printf("Can not find any active worksheet!"); return; } XYRange dr; dr.Add("X", wks, 0, 0, -1, 0); dr.Add("Y", wks, 0, 1, -1, 1); GraphPage gp; gp.Create("origin"); GraphLayer gl = gp.Layers(0); if ( !gl ) { printf("Can not get a graphlayer!"); return; } gl.CheckShowActivate(); uint nCntrl = GAP_USE_TEMPLATE | GAP_ALLOW_DUPLICATE_COL; gl.AddPlot(dr, IDM_PLOT_SCATTER, nCntrl); gl.Rescale(); DataPlot dp; dr.GetPlot(dp); return; }
DataRange::GetPlots, XYRange::MakePlot
origin.h