Re: gStyle->SetErrorX(dx)

From: Alexander Mann <amann_at_uni-goettingen.de>
Date: Wed, 2 Jun 2010 10:38:08 +0200

Hi,

OK, many thanks, that's what I was looking for.

cu,
Alexander

Am 02.06.2010 10:37, schrieb Rene Brun:
> When creating a TGraphErrors, TGraphAsymmErrors, you can give a null
> pointer as argument for
> the array of errors along x or/and y. In this case, the errors will be
> taken as being null.
> You do not need to create yourself an array filled with 0s.
>
> Rene Brun
>
> Olivier Couet wrote:
>> Yes by definition, if you use TGraphAsymmErrors the erros should be
>> provided.
>> If you do not want to use errors use TGraph instead.
>> There is nothing to improve here.
>>
>> -----Original Message-----
>> From: Alexander Mann [mailto:amann_at_uni-goettingen.de] Sent: Wednesday,
>> June 02, 2010 10:30 AM
>> To: Olivier Couet
>> Cc: roottalk_at_root.cern.ch
>> Subject: Re: [ROOT] gStyle->SetErrorX(dx)
>>
>>
>> So if I only want to have the y errors drawn using TGraphAsymmErrors,
>> I always have to provide an additional array with 0s. Maybe this is
>> sth. that could be improved in future releases :)
>>
>> cu,
>> Alexander
>>
>>
>> Am 02.06.2010 10:27, schrieb Olivier Couet:
>>> gStyle->SetErrorX(dx) works for histogram. Here you draw a
>>> TGraphAsymmErrors.
>>> gStyle->SetErrorX(dx) as no effect on TGraphAsymmErrors.
>>> If one use TGraphAsymmErrors it is assume it is to the errors.
>>> The graph without errors is TGraph.
>>>
>>> -----Original Message-----
>>> From: Alexander Mann [mailto:amann_at_uni-goettingen.de]
>>> Sent: Wednesday, June 02, 2010 10:24 AM
>>> To: Olivier Couet
>>> Cc: roottalk_at_root.cern.ch
>>> Subject: Re: [ROOT] gStyle->SetErrorX(dx)
>>>
>>>
>>> Hi,
>>>
>>> so what's wrong with this code then:
>>>
>>> {
>>>
>>> gStyle->SetErrorX(0.0);
>>>
>>> h1 = new TH1F("h1", "h1", 2, -0.5, 1.5);
>>> h2 = new TH1F("h2", "h2", 2, -0.5, 1.5);
>>>
>>> h1->Fill(0);
>>> h2->Fill(0);
>>> h2->Fill(0);
>>> h2->Fill(1);
>>>
>>> h = new TGraphAsymmErrors(h1, h2);
>>>
>>> h->Draw("AL");
>>>
>>> }
>>>
>>> Does draw x error bars.
>>>
>>> Is there a way to disable those without using an additional array?
>>>
>>> cu,
>>> Alexander
>>>
>>>
>>> Am 02.06.2010 10:05, schrieb Olivier Couet:
>>>> This setting dx=0 in gStyle->SetErrorX(dx) remove the errors bar
>>> display
>>>> along X.
>>>> As it is explain in the doc.
>>>>
>>>> -----Original Message-----
>>>> From: owner-roottalk_at_root.cern.ch
>> [mailto:owner-roottalk_at_root.cern.ch]
>>>> On Behalf Of Alexander Mann
>>>> Sent: Tuesday, June 01, 2010 7:38 PM
>>>> To: roottalk_at_root.cern.ch
>>>> Subject: [ROOT] gStyle->SetErrorX(dx)
>>>>
>>>> Hi,
>>>>
>>>> the documentation http://root.cern.ch/root/html/TGraphPainter.html
>>> says:
>>>> "gStyle->SetErrorX(dx) controls the size of the error along x. dx = 0
>>>> removes the error along x."
>>>>
>>>> Does this method to get rid of the x-error bars work?
>>>>
>>>> cu,
>>>> Alexander
>>>>
>>
>
Received on Wed Jun 02 2010 - 10:38:06 CEST

This archive was generated by hypermail 2.2.0 : Wed Jun 02 2010 - 11:50:01 CEST