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
 Origin Forum
 How do I loop through sheets to plot graphs?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jblake

3 Posts

Posted - 05/03/2019 :  12:39:58 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

}

Chris D

428 Posts

Posted - 05/03/2019 :  3:47:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

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



Thanks,
Chris Drozdowski
Originlab Technical Support
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