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
 How do I loop through sheets to plot graphs?

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
jblake Posted - 05/03/2019 : 12:39:58 PM
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:OriginPro 2018 64bit

Hey so I'm trying to write a script that allows me to loop through sheets in a book and perform a calculation (exp(-Col(A)) and then loop through the book again and plot this new column (Y) against another (x) from each sheet and then plot all in one graph together.Below is the code I have so far. The problem is with the plotting. This code plots the graph from the first sheet in the book but then does something strange with the other sheets and also plots extra graphs that I did not specify. Please help!

doc -ef LB // Loop through all individual sheets in all books in the current Project Explorer folder
{
if (exist(%H, 2) == 0) // This filters our Matrix sheets that may be in folder.
continue; // If the current item in the loop is NOT a worksheet,

Col(C) = exp(-Col(A));

}



doc -ef LB // Loop through all individual sheets in all books in the current Project Explorer folder
{
if (exist(%H, 2) == 0) // This filters our Matrix sheets that may be in folder.
continue; // If the current item in the loop is NOT a worksheet,

plotxy iy:=(B,C) plot:=200;// Plots line graph

}
1   L A T E S T    R E P L I E S    (Newest First)
Chris D Posted - 05/03/2019 : 3:47:04 PM
Hi,

jblake and I have subsequently conversed via Tech support chat on this subject.



Thanks,
Chris Drozdowski
Originlab Technical Support

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