Re: Histogram title

From: Jiri Kvita <Jiri.Kvita_at_cern.ch>
Date: Mon, 7 Feb 2011 15:39:46 +0100


Hello Rene!

Thanks for an interesting post!
However, I keep getting a null pointer to the title... See attach with your lines + little modifications: root -l hist_title.C
I tried under 5.28.

With thanks and regards,

Jiri

Rene Brun wrote:

> example:
> 
>  TCanvas c1;
>  myhist->Draw();
>  TPaveText *title = (TPaveText*)c1.GetPrimitive("title");
>  title->SetFillColor(kCyan);
>  c1.Modified();
> 
> Rene Brun
> 
> 
> On 04/02/2011 18:39, Mario Kadastik wrote:

>> Hello,
>>
>> I've found how to enable and disable the histogram title printing, but
>> how do I access the element itself per histogram? I would like to
>> change the fill color, the shadow if possible as well as the concrete
>> location where it's drawn. I've got a generic style setting file (the
>> one CMS supplies for publications) and I've tuned it to generally show
>> good plots already (i.e. fill color kWhite everywhere), but the
>> histogram title that I'd like to use on some plots still comes out
>> with grayish filling and I have to manually intervene to make it white.
>>
>> Thanks in advance,
>>
>> Mario Kadastik, PhD
>> Researcher
>>
>> ---
>> "Physics is like sex, sure it may have practical reasons, but
>> that's not why we do it"
>> -- Richard P. Feynman
>>

>
-- 
------------------------------------------------------------------------
    Office: 40-3D-06, Tel. (+41 2276) 73436, Cell +41 76 239 5696
     Jiri.Kvita@cern.ch, A1 Rh+,  http://qitek.web.cern.ch/qitek/
------------------------------------------------------------------------


Received on Mon Feb 07 2011 - 15:39:51 CET

This archive was generated by hypermail 2.2.0 : Mon Feb 07 2011 - 17:50:01 CET