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;
|
|
|