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
 automating plots

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
Bempel Posted - 01/09/2003 : 07:14:06 AM
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 1°C at each graph. So on graph 1, I will have 25°C, on graph2 26°C, on graph3 27°C, 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
5   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 01/10/2003 : 10:29:36 AM
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?

Bempel Posted - 01/10/2003 : 07:21:48 AM
Well this doesn't work. My loop doesn't work anymore...
rlewis Posted - 01/09/2003 : 7:53:55 PM
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
Bempel Posted - 01/09/2003 : 6:31:03 PM
Ok thany you, solves problem 2, but problem 1 remains.
rlewis Posted - 01/09/2003 : 3:19:53 PM
Try this ...

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


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