Logo ROOT  
Reference Guide
arrows.C File Reference

Detailed Description

View in nbviewer Open in SWAN Draw arrows.

void arrows(){
TCanvas *c1 = new TCanvas("c1");
c1->Range(0,0,1,1);
TPaveLabel *par = new TPaveLabel(0.1,0.8,0.9,0.95,"Examples of various arrows formats");
par->SetFillColor(42);
par->Draw();
TArrow *ar1 = new TArrow(0.1,0.1,0.1,0.7);
ar1->Draw();
TArrow *ar2 = new TArrow(0.2,0.1,0.2,0.7,0.05,"|>");
ar2->SetAngle(40);
ar2->SetLineWidth(2);
ar2->Draw();
TArrow *ar3 = new TArrow(0.3,0.1,0.3,0.7,0.05,"<|>");
ar3->SetAngle(40);
ar3->SetLineWidth(2);
ar3->Draw();
TArrow *ar4 = new TArrow(0.46,0.7,0.82,0.42,0.07,"|>");
ar4->SetAngle(60);
ar4->SetLineWidth(2);
ar4->SetFillColor(2);
ar4->Draw();
TArrow *ar5 = new TArrow(0.4,0.25,0.95,0.25,0.15,"<|>");
ar5->SetAngle(60);
ar5->SetLineWidth(4);
ar5->SetLineColor(4);
ar5->SetFillStyle(3008);
ar5->SetFillColor(2);
ar5->Draw();
}
Draw all kinds of Arrows.
Definition: TArrow.h:29
virtual void Draw(Option_t *option="")
Draw this arrow with its current attributes.
Definition: TArrow.cxx:119
virtual void SetAngle(Float_t angle=60)
Definition: TArrow.h:58
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition: TAttFill.h:37
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition: TAttFill.h:39
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition: TAttLine.h:43
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition: TAttLine.h:40
The Canvas class.
Definition: TCanvas.h:31
A Pave (see TPave) with a text centered in the Pave.
Definition: TPaveLabel.h:20
virtual void Draw(Option_t *option="")
Draw this pavelabel with its current attributes.
Definition: TPaveLabel.cxx:77
return c1
Definition: legend1.C:41
Author
Rene Brun

Definition in file arrows.C.