Kaeguri
1
Here is my code :
TArrow * Arr_Variance = new TArrow(fit_x_min-sigma_min, fit_y_min+1. ,
fit_x_min+sigma_max, fit_y_min+1. ,
1., "<|>") ;
// Draw
graph_llh_2 -> Draw("AP" ) ;
Arr_Variance -> Draw("SAME") ;
But in my canvas the arrows are not visible all I get is a thin line. Any idea of what’s missing ?
Ok I’ve found it Idid :
Arr_Variance -> Draw("SAME <|>") ;
couet
2
It works for me on a Linux machine with the latest ROOT version ( 5.17/05):
void graph_and_arrow() {
TCanvas *c1 = new TCanvas("c1","A Simple Graph Example",200,10,700,500);
const Int_t n = 20;
Double_t x[n], y[n];
for (Int_t i=0;i<n;i++) {
x[i] = i*0.1;
y[i] = 10*sin(x[i]+0.2);
}
gr = new TGraph(n,x,y);
gr->SetMarkerStyle(20);
gr->Draw("AP");
TArrow *arrow = new TArrow(1.874544,8.536461,0.1366307,2.987824,0.05,"<|>");
arrow->Draw();
}
Kaeguri
3
Ok thanks,
I am using ROOT v 5.14, I will keep in mind to switch as soon as possible