Hi everyone,
my script plots 45 graphs into 45 layers of one plot. To do this, I calculate the start and stop value for the first graph, then translate all worksheets so that the plots have the same starting point. Next, I plot every single graph and then merge them into one. Last, I rescale every layer, so that there is 10 % space to the axes, vertically. Now, sometimes the plot heights change (due to my measurement). How can I do the rescaling so that for each graph, the first and last point exactly match in the merged plot?
first=0;last1=0;last=0; doc -e W { %A = %H; if(exist(%A_C)==1) { first=%A!cell(1,3); // calculate first and last value last=%A!cell($(wks.maxRows),3) }; break; };
doc -e W {kk=$(first)-%H_C[1];%H_C=%H_C+$(kk)}; // translate y-values
doc -e W { // plot every single graph %C = %H; worksheet -s 3 0; worksheet -p 200 kaptemplate3; };
label -s -d 500 300 -n filename %C; %t=%C; win -m; // merge all graphs diff=($(last)-$(first))/10; // 10 % of Trace difference doc -e L { // scale all Layers layer.Y.from=$(first)-$(diff); layer.Y.to=$(last)+$(diff); }; layer1.Y.ticks=1; layer1.Y2.ticks=1;
Regards, Cougar
|