Hi Harufumi,
the following macro should work:
{
Double_t x[7] = {1.0, 2.5, 4.0, 7.0,
10.0, 30.0, 60.0};
Double_t y[7] = {1.5e-11, 3.0e-12, 1.7e-12, 4.0e-13,
4.0e-15, 4.0e-14, 2.0e-16};
Double_t ye[7]= {4.0e-12, 1.0e-12, 8.0e-13, 1.0e-13,
7.0e-15, 3.0e-14, 4.0e-16};
TCanvas * c1 = new TCanvas("c1","c1");
c1->SetLogx(); c1->SetLogy();
TGraphErrors *gr = new TGraphErrors(7, x, y, 0, ye);
gr->Draw("AP");
// force new min/max
// Note: only after gr->Draw Histogram exists
gr->GetHistogram()->SetMaximum(1e-10);
gr->GetHistogram()->SetMinimum(1e-18);
c1->Modified(kTRUE);
}
--------------------------------------------------------------
I guess root cannot / does not draw points with negative
values or errors in log scale.
Note point 7: 2.0e-16, with errors: minus 2.0e-16 to plus 6.0e-16
Cheers
Otto
On Tue, 18 Dec 2001, Harufumi Tsuchiya wrote:
>
> Hi ROOTers.
>
> I have the data which must be displayed in log scale.
> The data is like below.
>
> x y yerror
> 1.0 1.5e-11 4.0e-12
> 2.5 3.0e-12 1.0e-12
> 4.0 1.7e-12 8.0e-13
> 7.0 4.0e-13 1.0e-13
> 10.0 4.0e-15 7.0e-15
> 30.0 4.0e-14 3.0e-14
> 60.0 2.0e-16 4.0e-16
>
> As I would like to show data with error bars, I used TGraphErrors.
>
> c1->SetLogx(); c1->SetLogy();
> TGraphErrors *gr = new TGraphErrors(ndata, x, y, 0, yerror)
> gr->Draw("AP")
>
> But I could not get all data points with errors.
> As I attached this e-mail, the data point with x = 10.0 and 60.0 were not
> appeared on graph. Other data points appeared together with errorbars.
>
> I thought that if the values of the data points were smaller than errors,
> the data point and the accompanied errors were not drawn.
> Is is correct ?
>
> If someone know the method to avoid the my uncomplete result,
> Please tell me.
> I would like to show all data points with error bars.
>
> I use ROOT v 3.02.06 on IRIX64 and g++ 2.95.2.
>
> Thanks
>
> Harufumi Tsuchiya
>
>
>
--
Otto Schaile Sektion Physik, LMU Muenchen
Phone: +49 89 289 14070 Am Coulombwall 1, D-85748 Garching, Germany
GSM: +49 160 1553598
FAX: +49 89 289 14072 EMail: Otto.Schaile@Physik.Uni-Muenchen.DE
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:12 MET