I have two problems (parts in red in the code) :
_ I want to delete the ticklabels; the ticks and the labels for all the layers plotted (leave just one and name it "Intensity (a.u)"). I think it could be done by layer.axis.label .. I couldn't do it.
_ I am looking for a way to declare range variables and use them in a loop. I want the Ys axis to start from the minimum of col$(nn$(ii)+3). When I execute my code an error pops up (see screenshot).
range [book1] time=1, mz=4; //declaring the range variables
//Pop up a dialog and enter the M/z to plot
getn
(M/z) nn1
(M/z) nn2
(M/z) nn3
(M/z) nn4
(M/z) nn5
(M/z) nn6
(M/z) nn7
(M/z) nn8
(M/z) nn9
(M/z) nn10
(M/z) nn11
(M/z) nn12
(M/z) nn14
(M/z) nn15
(M/z) nn16
(M/z) nn17
(M/z) nn18
(Which M/z do you want to plot ?);
//loop to plot each column in distinct layer
int cnt=0; //counter to avoid zeros
for(ii=1;ii<=18;ii++)
{
if (nn$(ii) == 0)
{
cnt++;
continue;
};
plotxy iy:=[Book1]!(1,$(nn$(ii)+3)) plot:=200;
// This links Layer ii to Layer1
layer$(ii-cnt).link = 1;
layer$(ii-cnt).x.link = 1;
//scale the X axis
layer$(ii-cnt).x.from = min(time);
layer$(ii-cnt).x.to = max(time);
//delete Y labels and ticks and tick labels
//scale the Ys
mz = col$(nn$(ii)+3);
layer$(ii-cnt).y.from = min(mz);
}