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
 automating plots
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Bempel

France
19 Posts

Posted - 01/09/2003 :  07:14:06 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
With the following script I have automated 4 plots of 4 colums. It works fine. I want to add two more things...

SCRIPT:

getfilename *.dat;
getnumber "last graph to be plotted" nbc;
ii=1;
loop (ii,2,nbc){
type $(ii);
%O=%[%a,'_']_$(ii).dat;
win -t wks;
open -w %O;
type %O;
type %H;
work -c M; //creates a new column and names it M;
work -c N;
work -c O;

%H_M=abs(%H_H);
%H_N=%H_H+160;
%H_O=abs(%H_I);
%J=%H;
win -t plot rheo G%[%O,'.'];
layer.include(%J_O,201);
layer.include(%J_M,201);
layer.include(%J_N,201);
layer.include(%J_I,201);

set %J_I -k 2; // shape#=1 (square), 2 (circle), ...
set %J_I -cse 1;
set %J_I -csf 18;
set %J_I -z 8;

set %J_M -k 1; // shape#=1 (square), 2 (circle), ...
set %J_M -csf 1; // fill color#=1 (black), 2 (red), 3 (green), etc
set %J_M -cse 1; // edge color
set %J_M -z 8; // set symbol interior 2=open

set %J_N -k 5;
set %J_N -csf 2;
set %J_N -cse 2;
set %J_N -z 8;

set %J_O -k 1;
set %J_O -cse 1;
set %J_O -csf 18;
set %J_O -z 10;

layer -b c 1;
X1=0.1; X2=10000; // x-axis range
Y1=10; Y2=1000000; // y-axis range
label -s -p 103 0 \+(%H); // labels the graphs name on given position
};

1) I want to add in a text label with the <label> command a mean value of column L (for example). I have tried a few things but it doesn't work. It should be possible to take the mean value of variable lines of the column (e.g. from line 1 to line i, i being a number that can be changed).

2) I'm looking for a possibility to add to each graph a text label that says for instance T= k C, k being equal to 25 for example AND k increasing by 1C at each graph. So on graph 1, I will have 25C, on graph2 26C, on graph3 27C, etc.

Can anybody help me to find find the right commands to do this?
Thanks

Stephane


Edited by - Bempel on 01/09/2003 07:15:55 AM

rlewis

Canada
253 Posts

Posted - 01/09/2003 :  3:19:53 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Try this ...

v=50;
%Q=Temp=$(v);
label -n MyLabel Text;
label -s -n MyLabel %Q;

Go to Top of Page

Bempel

France
19 Posts

Posted - 01/09/2003 :  6:31:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ok thany you, solves problem 2, but problem 1 remains.
Go to Top of Page

rlewis

Canada
253 Posts

Posted - 01/09/2003 :  7:53:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
How about this ...

%P=WorkSheetName_ColumnName;
win -t data origin;
set %P -bs startrange;
set %p -es endrange;
sum(%P); //summation of %P between startrange and endrange
win -cd %H;
sum.mean= // returns the mean of %P between startrange and endrange
Go to Top of Page

Bempel

France
19 Posts

Posted - 01/10/2003 :  07:21:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Well this doesn't work. My loop doesn't work anymore...
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 01/10/2003 :  10:29:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

Well this doesn't work. My loop doesn't work anymore...



One possible cause - the number of characters between { and } of the loop may have exceeded more than the limit, about 1000 characters. Did you check it?

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