Dear Alexander,
Please try to apply the "rule of thumb". It is as follows.
To customize THStack object look one MUST 'Draw()' it TWICE (at least).
Re-check now the Duc's example from '3 steps' rule stand point. Do not ask me why it (THstack) was done this way. I do now know.
Hope this helps.
Best regards , Valeri Fine
> -----Original Message-----
> From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On Behalf Of Duc
> Bao Ta
> Sent: Friday, September 16, 2011 7:16 PM
> To: Alexander Mann
> Cc: roottalk_at_root.cern.ch
> Subject: Re: [ROOT] How to set range of y-axis for THStack?
>
> Hi Alexander,
>
> have a look at the reference for THStack
> (http://root.cern.ch/root/html/THStack.html#THStack:GetXaxis), this
> should work:
> >>> stack.Draw()
> >>> stack.GetXaxis().SetRangeUser(-1,1)
> >>> stack.Draw()
>
> Cheers
> Duc
>
> On 16 September 2011 18:35, Alexander Mann <amann_at_uni-goettingen.de> wrote:
> >
> > Hi,
> >
> > I haven't succeeded at the simple task of setting the y-axis range for a
> > THStack using all possible ways I could think of.
> >
> > The example script I have attached demonstrates all the things I've tried.
> > Most of them indeed do influence the y-axis range, but none yields targeted
> > value of 3.
> >
> > Using ROOT 5.30/00. The y-axis is logarithmic.
> >
> > I'd be grateful for any hints.
> >
> > cu
> > Alexander
> >
Received on Mon Sep 19 2011 - 02:36:15 CEST
This archive was generated by hypermail 2.2.0 : Mon Sep 19 2011 - 11:50:01 CEST