Re: [ROOT] fill

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Mar 16 2001 - 22:44:47 MET


Hi Charles,
You can set the frame fillcolor in two ways (a priori/a posteriori)
 - create your canvas, say c1
   c1.SetFrameFillColor(myColor)
   h.Draw()

 - h.Draw()
   gPad->GetFrame()->SetFillColor(myColor)
   gPad->Modified()

With the first form, you set a pad attribute. Everytime you draw a new
histogram, the frame is craeted using the pad color attribute.

With the second form, the change is only valid for the current frame.
A new frame will be created at the next Draw operation. This new frame
will be created with the pad framefillcolor attribute.

Rene Brun

On Fri, 16 Mar 2001, Charles J Seely wrote:

> Hi,
> 
> I want to fill a 2D histogram with some fill color.  But so far I have
> only managed to fill the entire canvas (I just want color inside the
> axes).  How do I do this?
> 
> I am using: c1->GetFrame()->SetFillColor(5)
> for example.
> 
> Thanks,
> 
> Jason
> 
> -----------------------------------------------------------------------------
> 
> Jason Seely
> 26-648
> Massachusetts Institute of Technology
> 77 Massachusetts Avenue
> Cambridge, MA 02139-4307
> 
> email:  seely@mit.edu
> phone:  617-253-4772
> 
> -----------------------------------------------------------------------------
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:40 MET