ROOT
v6-26
Reference Guide
Loading...
Searching...
No Matches
bent.C File Reference
Tutorials
»
Graphs tutorials
Detailed Description
Bent error bars
void
bent
()
{
const
Int_t
n
= 10;
Double_t
x
[
n
] = {-0.22, 0.05, 0.25, 0.35, 0.5, 0.61,0.7,0.85,0.89,0.95};
Double_t
y
[
n
] = {1,2.9,5.6,7.4,9,9.6,8.7,6.3,4.5,1};
Double_t
exl[
n
] = {.05,.1,.07,.07,.04,.05,.06,.07,.08,.05};
Double_t
eyl[
n
] = {.8,.7,.6,.5,.4,.4,.5,.6,.7,.8};
Double_t
exh[
n
] = {.02,.08,.05,.05,.03,.03,.04,.05,.06,.03};
Double_t
eyh[
n
] = {.6,.5,.4,.3,.2,.2,.3,.4,.5,.6};
Double_t
exld[
n
] = {.0,.0,.0,.0,.0,.0,.0,.0,.0,.0};
Double_t
eyld[
n
] = {.0,.0,.05,.0,.0,.0,.0,.0,.0,.0};
Double_t
exhd[
n
] = {.0,.0,.0,.0,.0,.0,.0,.0,.0,.0};
Double_t
eyhd[
n
] = {.0,.0,.0,.0,.0,.0,.0,.0,.05,.0};
TGraphBentErrors
*
gr
=
new
TGraphBentErrors
(
n
,
x
,
y
,exl,exh,eyl,eyh,exld,exhd,eyld,eyhd);
gr
->
SetTitle
(
"TGraphBentErrors Example"
);
gr
->
SetMarkerColor
(4);
gr
->
SetMarkerStyle
(21);
gr
->
Draw
(
"ALP"
);
}
Int_t
int Int_t
Definition
RtypesCore.h:45
Double_t
double Double_t
Definition
RtypesCore.h:59
TAttMarker::SetMarkerColor
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
Definition
TAttMarker.h:38
TAttMarker::SetMarkerStyle
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
Definition
TAttMarker.h:40
TGraphBentErrors
A TGraphBentErrors is a TGraph with bent, asymmetric error bars.
Definition
TGraphBentErrors.h:25
TGraph::SetTitle
virtual void SetTitle(const char *title="")
Change (i.e.
Definition
TGraph.cxx:2353
TGraph::Draw
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
Definition
TGraph.cxx:769
y
Double_t y[n]
Definition
legend1.C:17
x
Double_t x[n]
Definition
legend1.C:17
n
const Int_t n
Definition
legend1.C:16
gr
TGraphErrors * gr
Definition
legend1.C:25
bent
Definition
bent.py:1
Author
Olivier Couet
Definition in file
bent.C
.
tutorials
graphs
bent.C
ROOT v6-26 - Reference Guide Generated on Mon Sep 11 2023 21:03:22 (GVA Time) using Doxygen 1.9.8