Hi there !
I have some pretty strange things going on here.
I have written a script (included below) that is supposed to do some things with plot etc. When I run it from the script window (which is how I wrote it) it runs fine, but when I call it from a menu (with run All-PIE-Curves.txt) it does not completely do the same thing.
Has anybody had the same experience ?Short explanantion of what the script does.
The Project consists out of 6 worksheets (Scan3, Scan4, Scan5, Scan 1B, Scan2B and Scan3B).
They all contain similar data of different measurements. In order to compare these measurements we want to plot the corresponding data sets of all measurements on one page. The script goes over all worksheets, picks out matching columns (have the same number in each worksheet). These are plotted on 6 temporary plots (using a certain template). These are merged into one plot and the 6 different layers are arranged in 2 rows of 3 plots. These 6 graphs all contain one column of a certain worksheet. This all runs fine when I run it from the script window.
But when I call it from the menu.
============Menu
menu -Worksheet
menu 11 &PMacro
menu
(PIE &Curves for all masses from all scans)
{
run
All-PIE-Curves.txt
}
====================================
It is only partially run.It only keeps the last merged plot (although it goes through all steps in the routine). The graphs in this page (6 layers) contain ALL columns of the worksheet !!! I really don't understand what is guing on.
Can anybody help me, plz.
Thanks,
Peter
P.S. Feel free to use and alter this macro for your own use.
======================Script:All-PIE-Curves.TXT========================================================================================================================================================
type -n Making PIE Curve comparissons for all masses throughout all Scans. \n
Are all Scan data files present and named: \n Scan3 Scan4 Scan5 Scan1B Scan2B
Scan3B;
win -a Scan3;
getnumber -s (Number of Cluster sizes to plot) totplots (Plot Info);
loop (s,1,3)
{
win -a Scan$(s 2);
loop (var,2,wks.ncols)
{
wks.col$(var).type=2;
};
win -a Scan$(s)B;
loop (var,2,wks.ncols)
{
wks.col$(var).type=2;
};
};
loop (colvar,2,totplots 1)
{
win -a Scan3;
wks.col$(colvar).type=1;
worksheet -s 0 0 0 0;
worksheet -p 201 CLUSTER-PIE.OTP;
worksheet -b
wks.col$(colvar).type=2;
worksheet -s 1 1 1 1;
win -a Scan4;
wks.col$(colvar).type=1;
worksheet -s 0 0 0 0;
worksheet -p 201 CLUSTER-PIE.OTP;
worksheet -b
wks.col$(colvar).type=2;
worksheet -s 1 1 1 1;
win -a Scan5;
wks.col$(colvar).type=1;
worksheet -s 0 0 0 0;
worksheet -p 201 CLUSTER-PIE.OTP;
worksheet -b
wks.col$(colvar).type=2;
worksheet -s 1 1 1 1;
win -a Scan1B;
wks.col$(colvar).type=1;
worksheet -s 0 0 0 0;
worksheet -p 201 CLUSTER-PIE.OTP;
worksheet -b
wks.col$(colvar).type=2;
worksheet -s 1 1 1 1;
win -a Scan2B;
wks.col$(colvar).type=1;
worksheet -s 0 0 0 0;
worksheet -p 201 CLUSTER-PIE.OTP;
worksheet -b
wks.col$(colvar).type=2;
worksheet -s 1 1 1 1;
win -a Scan3B;
wks.col$(colvar).type=1;
worksheet -s 0 0 0 0;
worksheet -p 201 CLUSTER-PIE.OTP;
worksheet -b
wks.col$(colvar).type=2;
worksheet -s 1 1 1 1;
win -m;
win -r Graph7 Mass$(colvar);
loop (var,1,6)
{
win -b Graph;
win -c;
};
win -a Mass$(colvar);
loop (nlayer,1,6){
layer$(nlayer).unit=4;
layer$(nlayer).height=70;
layer$(nlayer).width=62;
};
loop (nlayer,1,3){
layer$(nlayer).top=20;
layer$(nlayer 3).top=99;
};
layer1.left=43;
layer2.left=120;
layer3.left=196;
layer4.left=43;
layer5.left=120;
layer6.left=196;
win -a Mass$(colvar);
win -i };
win -a Scan3;
win -i;
win -a Scan4;
win -i;
win -a Scan5;
win -i;
win -a Scan1B;
win -i;
win -a Scan2B;
win -i;
win -a Scan3B;
win -i;
loop
(colvar,2,totplots 1){
win -a
Mass$(colvar);
};
[Note: This message was edited by Julie]