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 for Programming
 LabTalk Forum
 3 Layers Graph

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
Ketanbhargav Posted - 02/26/2014 : 12:41:24 AM
Hi There Guys


I´m trying to write a script enabling me to plot three graphs into separate layers from one active wordbook. Also I was asked to think about a script helping to plot several graphs, all from different different workbooks in one single layer. Is there any easy way to express this in Lab Talk?
thanks in advance

Ketan

http://www.indian-astrologer.co.in/
1   L A T E S T    R E P L I E S    (Newest First)
Echo_Chu Posted - 02/26/2014 : 02:20:23 AM
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

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