Here is the OC code I promised, basically the LT color function added ability in Origin2021 to form the OCOLOR value needed to specify offset and type:
void plot_color_from_col()
{
Worksheet wks = Project.ActiveLayer(); // get worksheet with group.dat data
// plot simple scatter plot
DataRange dr;
dr.Add(wks, 0, "X");
dr.Add(wks, 1, "Y");
GraphPage gp;
gp.Create("scatter"); // create scatter graph
GraphLayer gl = gp.Layers(0);
int nPlot = gl.AddPlot(dr, IDM_PLOT_SCATTER); // add plot to layer
gl.Rescale();
DataPlot dp = gl.DataPlots(nPlot);
dp.SetSymbol(12); // set symbol shape: empty circle
//LT color function color(offset, type), type: n=index, r=RGB, m=colormap
double vv;LT_evaluate("color(1,n)",&vv);
int oColor = (int)vv;
dp.SetColor(oColor);
}
CP