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 for Programming
 LabTalk Forum
 Not operatinal script from origin 7.5 help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

autopilot

26 Posts

Posted - 02/12/2009 :  12:37:40 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

VincentLiu

China
Posts

Posted - 02/13/2009 :  03:24:58 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - VincentLiu on 02/13/2009 03:33:19 AM
Go to Top of Page

autopilot

26 Posts

Posted - 02/13/2009 :  07:56:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
right, everything works now. It was my mistake :)
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