Hi, Ketan
To plot graph in different layer of a graph. You can create a desired template and then add the plot to each layer one by one.
Please take the codes below as an example. In the example I used build-in 4 panel template, PAN4. You can specify your customized template.
// Import data file
string fpath$ = "Samples\Import and Export\S15-125-03.dat";
string fname$ = system.path.program$ + fpath$;
impASC;
// Remember Book and Sheet names
string bkname$ = page.name$;
string shname$ = layer.name$;
// Plot the first and second columns as X and Y in a specified template.
// The worksheet is active, so can just specify column range
plotxy iy:=(1,2) plot:=202 ogl:=[<new template:=PAN4>];
// Plot the remaining columns as X and Y into the second layer
// Now that the graph window is the active window, need to specify Book
//and Sheet;
loop (ii, 3, 4)
{
// Add dataset into a layer
plotxy [bkname$]shname$!$(ii) plot:=202 rescale:=1 ogl:=$(ii-1);
}
To plot different workbooks in a single layer, you can also get used to the plotxy function as in above code, but specify the bkname and shname as needed and keep setting "ogl:=1";
Echo
OriginLab Technical Service