RE: [ROOT] Adding colored boxes on a canvas

From: Olivier Couet (Olivier.Couet@cern.ch)
Date: Thu Mar 04 2004 - 17:55:59 MET


Hi Stelios,

 Does the following example answer your question ?

{
   TCanvas *c1 = new TCanvas("c1", "c1",14,28,700,500);
   TPad *newpad = new TPad("newpad", "newpad",0.2,0.3,0.8,0.7);                 
   newpad->Draw();
   c1->cd();
   TBox *box = new TBox(0.05,0.8,0.3,0.9);
   box->Draw(); 
}

 Cheers,     Olivier

> Hi,
> 
>     I am having a canvas plot and I would like to add some
> colored boxes on the canvas but outside of the frame area.
> 
>  If I do something like:
>
>        TBox bDTHC(1.1,1.5,1.6,1.45);
>
>     and the numbers on the constructor fall inside the frame area
> the box is displayed nicely.
>
>     How do I place the box outside of the frame area?
>
>     Thanks!
>
> Stelios.


-- 
Org:    CERN - European Laboratory for Particle Physics.
Mail:   1211 Geneve 23 - Switzerland                     Mailbox: J25910      
E-Mail: Olivier.Couet@cern.ch                            Phone:   +41 22 7676522
WWW:    http://cern.ch/Olivier.Couet/                    Fax:     +41 22 7677155



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET