Hi all,
I have a simple function DrawGraph which I use to create a multigraph but when I use this function in the main programm and run it I can’t interact with the canvas created. The displayed content is correct but nothing is clickable. It worked before for a week or so and now it doen’t anymore. Maybe something changed in the rootrc on LXplus, I don’t know :
DrawGraph(d_time,Model_k,"Kirchner",Model_p,"ISOLDE") ;
cout << "Restart fit with new parameters ? " << endl ;
cin >> answer ;
if (answer == "y") {
restart = true ;
cout << "Run "
<< "Norm "
<< "Effusion [s-1] "
<< "Diffusion [s-1] "
<< "S^2 "
<< endl ;
for(int unsigned i=0 ; i < ResultsTable.size() ; i++) {
printf("%-15.0f %-15.4f %-15.4f %-15.4f %-15.4f \n",ResultsTable[i][0],ResultsTable[i][1],ResultsTable[i][2],ResultsTable[i][3],ResultsTable[i][4]) ;
}
AskKirchnerParm(g_alpha, g_nu, g_mu) ;
}
else
restart = false ;
first_run = false ;
}
void DrawGraph(vector<Double_t> x, vector<Double_t> y1, char* name1, vector<Double_t> y2,char* name2){
TCanvas *c2 = new TCanvas("c2","Data plot",200,10,700,500);
TMultiGraph *mg = new TMultiGraph();
TLegend *legend = new TLegend(1,0.6,0.6,0.8);
c2->SetLogy(1);
c2->SetLogx(1);
mg->SetTitle("Kirchner and Isolde model vs. time");
TGraph *gr1 = new TGraph(x.size(),&x[0],&y1[0]);
gr1->SetMarkerColor(kBlue);
gr1->SetMarkerStyle(20);
mg->Add(gr1);
TGraph *gr2 = new TGraph(x.size(),&x[0],&y2[0]);
gr2->SetMarkerColor(kRed);
gr2->SetMarkerStyle(20);
mg->Add(gr2);
legend->AddEntry(gr1,name1) ;
legend->AddEntry(gr2,name2);
mg->Draw("ap") ;
legend->Draw();
c2->Update();
}