Hi, I would like Draw more graphs in differents windows. I created a class, and in this class I have a member called "Draw". It well runs. But I have a problem: if I call this member for two different objects, only the first one runs. void MyClass::Draw() { // double *d contains my values // n is the number of these values double* x; TGraph *gr; int i; TApplication* theApp; TCanvas *c ; double dd=0 TROOT simple("simple","Test of histogramming and I/O"); theApp = new TApplication("",&dd,NULL); c = new TCanvas("c", "DEMO", 200,10,600,400); x= (double*)calloc(n,sizeof(double)); for(i=0;i<n;i++) x[i]=i; gr=new TGraph(n,x,d); gr->Draw("AC."); c->Update(); theApp->Run(); } Example: int main(){ MyClass c1,c2; /*elaboration of c1 and c2*/ c1.Draw(); c2.Draw(); } ..but I can see only the c1 draw!!! Thank you, Giulio Ballardin
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:38 MET