RE: [ROOT] color axis

From: Valeri Fine (fine@bnl.gov)
Date: Sat Apr 05 2003 - 02:19:38 MEST


Hello Jacek,

> Hi,
> 
> > Once upon a time I wrote a class TColoredAxes:
> >
> > class TColoredAxis : public TGaxis, public TAttFill
> >
> >
http://www.star.bnl.gov/cgi-bin/cvsweb.cgi/StRoot/StEventDisplayMaker/TC
> > oloredAxis.cxx
> >
> > See example: http://www.rhic.bnl.gov/~fine/EventDisplay/
> 
> If you mean the axis which is put right on the "Event Display"
example,
> then yes, this looks quite nice.

 That's correct

> Now, would it be possible to add this into root?

  Why not? The class is rather small and has no external dependency but
TGaxis, public TAttFill
  So this is just another kind of TGaxis.

The Paint method explains things: 
void TColoredAxis::Paint(Option_t *)
{
   Double_t wmin = fWmin;
   Double_t wmax = fWmax;
   Int_t   ndiv = fNdiv;
   PaintPalette();
   PaintAxis(fX1,fY1,fX2,fY2,wmin,wmax,ndiv,fChopt.Data(),fGridLength);
}

where PaintPalette() is a method of the TColoredAxis class to paint the
colored boxes and PaintAxis( . . . )  is a standard method of the base
TGaxis class .
That paints the tick marks, labels, legends and other attributes.

If there is some interest and Rene likes it I can document it up and
submit

 My best regards, Valeri

> As a "draw" option ?
> So that instead of a black-white Z axis one gets a "thin" colored axis
?
> Or maybe the currently existing "palette" object (created by
> "surfXz") could be modified in such a way that it would replace the
> default black-white Z axis (it should be also made "narrow") ?
> Of course ... even now one can "edit/resize/move" this object, but I
think
> it would be nice to have such an automatic option.
> 
> Thanks in advance,
> Jacek.



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