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
 Not operatinal script from origin 7.5 help

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
autopilot Posted - 02/12/2009 : 12:37:40 PM
Origin Ver. and Service Release (Select Help-->About Origin): 7.5
Operating System:winxp

Layer command described is the official Origin 7.5 help:
Layer
Performs various operations on existing layers. The layer command operates on the active layer, except where specified.

and below these is an example which is not functional as it is supposed to be:
%A = data1; //assign worksheet name to %A
loop (ii, 2, 3)
{
win -t plot line; //open graph from line template
%B = data1!wks.col$(ii).name$; //assign column name to %B
layer -i %A_%B; //add data to layer
layer -a; //rescale axes to show all data
}


All I need to do is to plot the graph in one window from my worksheet. I have many columns: A(X1), B(Y1), C(Y1), D(X2), E(Y2), F(Y2)...

thanks for help
2   L A T E S T    R E P L I E S    (Newest First)
autopilot Posted - 02/13/2009 : 07:56:18 AM
right, everything works now. It was my mistake :)
VincentLiu Posted - 02/13/2009 : 03:24:58 AM
Hi,

The the help document said

"The following script creates a new graph window, adds data to the layer, and then creates a second graph window and adds data to that layer. "

It means that the example can create two graphs for column 2 and column 3 separately. And the examples accurately did these. To get what you want, you can simply modify the codes as following:

%A = data1; //assign worksheet name to %A
win -t plot line; //open graph from line template, just add a graph
loop (ii, 2, 3)
{
%B = data1!wks.col$(ii).name$; //assign column name to %B
layer -i %A_%B; //add data to layer
layer -a; //rescale axes to show all data
}


Best regards,
Vincent Liu
OriginLab Technical Services

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