| T O P I C R E V I E W |
| peter.cook |
Posted - 08/05/2004 : 5:06:53 PM Hi,
I would like to be ab le to check the order of datasets in a plot (labtalk pref but c would do) and then alter it. Even if i can just send one dataset to the 'top'.
Any ideas?
Cheers,
pete
|
| 1 L A T E S T R E P L I E S (Newest First) |
| Mike Buess |
Posted - 08/05/2004 : 7:37:16 PM Hi Pete,
You can read the current order with 'lay -c', which counts the plots and lists the dataset names in the string variable %Z...
%Z=""; lay -c; count=; // how many datasets are plotted? COUNT=3 %Z=; (Data1_B) (Data1_C) (Data1_D)
Now reverse the plot order (this is the only built-in reordering command that I know of)...
lay -r; %Z=""; lay -c; %Z=; (Data1_D) (Data1_C) (Data1_B)
Next, move Data1_D to the 'bottom'...
lay -e Data1_D; // remove Data1_D from layer lay -i Data1_D; // plot it again (as last dataplot) %Z=""; lay -c; %Z=; (Data1_C) (Data1_B) (Data1_D)
Finally, move Data1_B to the 'top' (somewhat more complicated)...
%Z=""; lay -c; // list all data plots to %Z lay -e %Z; // remove all plots from layer lay -i Data1_B; // plot Data1_B first loop (i,1,count) { %A=%[%Z,#i]; // plot remaining datasets if(%A!="Data1_B") lay -i %A; }; %Z=""; lay -c; %Z=; (Data1_B) (Data1_C) (Data1_D)
I'm not sure if the last two 'moves' will preserve the plot types and colors but you get the idea. Once you know the names of the current datasets you can replot them in any order you want.
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 08/05/2004 7:42:44 PM |
|
|