Please try the script below. Here we need to create graph page for each loop and then assign the page name as input for ogl.
for ( int i = 2; i <= 9; i++)
{
win -t plot origin.otp graph$(i);
doc -e W // loop all workbook in the project
{
plotxy (1,$(i)) plot:=200 ogl:=[graph$(i)]1!;
}
}
James