The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 loop and plot
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Smilik305

Germany
6 Posts

Posted - 10/09/2017 :  11:26:16 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I'd like to plot every 5th column into the same graph in one layer. I came up with the following script:
int ii;
int nCols=wks.nCols;
for (ii=9;ii<=nCols; ii+=4)
{

plotxy [book4]sheet1!wcol(ii) plot:=200;
layer.x.type=2;
layer.y.type=2;
rescale;
}

But, intead, it plots every column in a separate layer. With an additional indication of o:=[Graph1] it plots every column in a separate plot.
Could you please help me modify the code so that it does the job I want?

yuki_wu

896 Posts

Posted - 10/09/2017 :  10:28:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Specify the layer by:
plotxy iy:=[book4]sheet1!wcol(ii) plot:=200 ogl:=[Graph1]1!;

Hope it helps.

Regards,
Yuki
OriginLab
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000