Hi dear rooters
The title is exactly the question, you’ll see I have a macro like this:
{
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
FILE *fp1, *fp2,
float ptmp,p[30];
int i, iline=0;
ntuple = new TNtuple(“ntuple”,“NTUPLE”,“x:y:z”);
ntuple1 = new TNtuple(“ntuple1”,“NTUPLE”,“x:y:z”);
fp = fopen(“file1”,“r”);
while ( fscanf(fp,"%f",&ptmp) != EOF ){
p[i++]=ptmp;
if (i==3)
{
i=0; iline++;
ntuple->Fill(p[0],p[1],p[2]);
}
}
fp1 =fopen(“file2”,“r”);
while ( fscanf(fp1,"%f",&ptmp) != EOF ){
p[i++]=ptmp;
if (i==3)
{
i=0; iline++;
ntuple1->Fill(p[0],p[1],p[2]);
}
}
ntuple.Draw(“z:x”,"","");
ntuple1.Draw(“z:x”,"",“same”);
}
but I want to have these plots in 2 different pads on same canvas, one after another, same x axis and different y axis. Any comment or hint about it would be appreciated.
Thanks in advance.
Alma