Try this, following your original code as closely as possible.
int mycol1 = 6;
int mycol2 = 3;
string wbkname$=%H;
win -t plot;//create empty plot first so it remains %H
//plot all into 1st layer of active plot
loop (i,1,24)
{
plotxy [wbkname$](1:end)!(wcol(mycol1),wcol(mycol2))
plot:=200 ogl:=1!;
mycol1 = mycol1 + 6;
mycol2 = mycol2 +6;
}