You may need to call LT from OC to run plot_gboxindexed X-function. See code below. col(3) is data col and col(1),col(2) are group cols and these are inputs to the xfunction.
void Make_Plot()
{
Worksheet wks = Project.ActiveLayer();
string LTstr = "plot_gboxindexed -r 1 irng:=3 group:=(1,2) theme:=\"Box_I-shaped\"";
wks.LT_execute(LTstr);
}
The X-function can be referred from:
https://www.originlab.com/doc/X-Function/ref/plot_gboxindexed
James