Hi Jspector,
Plot histogram and get Bin worksheet please refer to the following codes:
void show_plot_histogram(int nColIndex = 1)
{
Worksheet wks = Project.ActiveLayer();
if( !wks )
{
MessageBox(NULL, "Please keep worksheet active!", "Error");
return;
}
GraphPage gp;
gp.Create("HIST");
GraphLayer gl = gp.Layers();
Curve cv(wks, nColIndex);
if( gl.AddPlot(cv, IDM_PLOT_HISTOGRAM_TYPE) >= 0)
{
gl.Rescale();
}
get_bin();//get bin data and put into one hidden worksheet
}
void get_bin()
{
string strLTCmd = "get %C -nhwc A; win -o %A {win -h 1;};";
LT_execute(strLTCmd);
}
Iris
Edited by - Iris_Bai on 04/15/2008 05:59:41 AM