[ROOT] Pads drawn on myCanvas, but points not drawn on TPad ...

From: zaldy (zaldy@neutrino.kek.jp)
Date: Sun Nov 16 2003 - 20:08:45 MET


Dear ROOT Talk,

What is wrong with the codes below?

I have all the declarations at the header file "file.hh".
If I use B line the points of TGraph are drawn on the Canvas. But if I use 
the A lines, the pads are drawn but the points are not drawn. I know the 
current pads from line C.

I though that if we invoke myPad_in_the_canvas->cd();
Then the Pad objects owns the the TGraph points, so the points should 
appear in the pads.

Is there like a function under TGraph like
     TGraph * myGraph  = new ....
     myGraph->SetNDC(); /////this is similar in TText;
     

Any idea?
Thank you ....


root 3.04/02
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
--------------------------
...................
..................
    B       myCan->cd();

    A       currentPad = (TPad *)MainPad->GetPad(11);
    A       currentPad->cd();
    A       currentPad->Clear();

    C       cout <<"Current Pad: "<< gPad->GetName()<< endl;
           Top_hit = new TGraph(n_hit_top, tophit_layer, tophit_strip);
           Top_hit->SetMaximum(120);
           Top_hit->SetMinimum(-2);
           Top_hit->Draw("ap");



-- 

--------------------------------------------------------
                   Zaldy A. Nawang 
                   PS Users Room 2
                   Yon Gokan, 
                   E362, Neutrino Group, 
                   IPNS, KEK, 
                   Japan 
                    
                   e-mail: zaldy@neutrino.kek.jp
                   Tel. No. : (81) 029864 - 5387
--------------------------------------------------------



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET