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
 All Forums
 Origin Forum
 Origin Forum
 loop and plot

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Smilik305 Posted - 10/09/2017 : 09:55:25 AM
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?

3   L A T E S T    R E P L I E S    (Newest First)
Cabesaso Posted - 10/13/2017 : 11:55:04 AM
That works like a charm. Thanks from me as well Couturier!
Smilik305 Posted - 10/10/2017 : 04:45:31 AM
Thank you!
couturier Posted - 10/10/2017 : 03:21:45 AM
Just specify the layer in which you want to plot your data:
o:=[Graph1]1!

as for
layer.x.type=2;
layer.y.type=2;
rescale;

it can be put outside of the loop. No need to execute these lines for each iteration

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000