Hi, I tried to draw 1d histogram on canvas but canvas is not shown. Is there something I missed in the following codes? These are part of my codes: ======================================================= printf("Do you want to see tracking plot?(y/n)\n"); scanf("%s",&ans); if (ans=='y') { // Create histogram TH1F *layer1 = new TH1F("layer1","layer#1 profile",20,-25.,25.); // Fill histogram for(i=0; i<20; i++) layer1->Fill(2.5*(j-9)-1.25,yed[1][j]); // Create a new canvas TCanvas *c1 = new TCanvas("c1","Tracking of Incident Particle", 200,10,700,500); c1->SetFillColor(42); c1->GetFrame()->SetFillColor(21); c1->GetFrame()->SetBorderSize(6); c1->GetFrame()->SetBorderMode(-1); layer1->Draw("cp"); c1->Modified(); c1->Update(); ========================================================== It is successfully compiled and give a prompt,"Do you want to see tracking plot?(y/n)" when I execute. However, in some reason it just exit from the program without showing any plot when I type "y". --- Thanks, Jayoung
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:30 MET