RE: histogram stats styles

From: Ilka Antcheva <Ilka.Antcheva_at_cern.ch>
Date: Tue, 29 Aug 2006 21:06:54 +0200


Hi Emanuel,  

You can set different TPaveStats options via provided user interface. In the canvas window you can activate the graphics editor vie View menu / Editor. The editor will appear on the left of the canvas window and will provide user interface according to the selected object in the canvas window. To select an object you should click on it with left mouse button. If you select TPaveStats object, the user interface for it will appear on the editor frame and you can select different options via it. They will be applied only for the selected stats and will not change anything for the others. A picture of this interface can be seen at http://root.cern.ch/root/htmldoc/TPaveStatsEditor.html  

Best regards, Ilka


From: owner-roottalk_at_pcroot.cern.ch on behalf of Emanuel Machado Sent: Tue 8/29/2006 8:32 PM
To: roottalk_at_pcroot.cern.ch
Subject: RE: [ROOT] histogram stats styles

How could I set it on a single histogram (i.e. not disrupting others)? I tried to get the stats object as

TPaveStats *stats = h->GetListOfFunctions()->FindObject("stats"); stats->SetOptStat( newoption )

(as in stressGraphics.cxx)

But stats here is always returned NULL.

Thanks,

Emanuel



Emanuel Machado, PhD.
Senior Engineer

Cytonome, Inc.
27 Drydock Ave
Boston, MA 02210
Voice: (617) 330-5030 ext. 237
Fax: (617) 330-5031
Website: www.cytonome.com

Email: Emanuel-Machado_at_cytonome.com
> -----Original Message-----
> From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch]
> On Behalf Of Emanuel Machado
> Sent: Tuesday, August 29, 2006 11:57 AM
> To: 'Rene Brun'
> Cc: roottalk_at_pcroot.cern.ch
> Subject: RE: [ROOT] histogram stats styles
>
>
> Aha! It works! Thanks for the pointer to the include file.
>
> Emanuel
>
> ----
> Emanuel Machado, PhD.
> Senior Engineer
>
>
>
> Cytonome, Inc.
> 27 Drydock Ave
> Boston, MA 02210
> Voice: (617) 330-5030 ext. 237
> Fax: (617) 330-5031
> Website: www.cytonome.com
>
> Email: Emanuel-Machado_at_cytonome.com
>
> > -----Original Message-----
> > From: Rene Brun [mailto:Rene.Brun_at_cern.ch]
> > Sent: Tuesday, August 29, 2006 11:49 AM
> > To: Emanuel Machado
> > Cc: roottalk_at_pcroot.cern.ch
> > Subject: Re: [ROOT] histogram stats styles
> >
> > This should also work in non-interactive mode. Simply
> > #include "TStyle.h"
> > gStyle->SetOptStat( newoption );
> >
> > Rene Brun
> >
> > On Tue, 29 Aug 2006,
> > Emanuel Machado wrote:
> >
> > > Hi,
> > >
> > >
> > >
> > > I realize that this may be a newbye question. Please bear with me.
> > >
> > >
> > >
> > > Looking at the user manual, the way to change the way a histogram
> > presents a
> > > stats box is to use
> > >
> > >
> > >
> > > gStyle->SetOptStat( newoption );
> > >
> > >
> > >
> > > This works well in interactive mode. What would be the equivalent way
> to
> > do
> > > it in non-interactive (i.e compiled) mode?
> > >
> > >
> > >
> > > Many thanks,
> > >
> > >
> > >
> > > Emanuel
> > >
> > >
> > >
> > > ----
> > >
> > > Emanuel Machado, PhD.
> > >
> > > Senior Engineer
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Cytonome, Inc.
> > >
> > > 27 Drydock Ave
> > >
> > > Boston, MA 02210
> > >
> > > Voice: (617) 330-5030 ext. 237
> > >
> > > Fax: (617) 330-5031
> > >
> > > Website: www.cytonome.com
> > >
> > >
> > >
> > > Email: Emanuel-Machado_at_cytonome.com
> > >
> > >
> > >
> > >
>
>
Received on Tue Aug 29 2006 - 21:07:02 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:00 MET