Author |
Topic  |
|
autopilot
26 Posts |
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
|
|
VincentLiu
China
Posts |
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
|
Edited by - VincentLiu on 02/13/2009 03:33:19 AM |
 |
|
autopilot
26 Posts |
Posted - 02/13/2009 : 07:56:18 AM
|
right, everything works now. It was my mistake :) |
 |
|
|
Topic  |
|
|
|