Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TGaxis_002.C
Go to the documentation of this file.
1{
2 auto c = new TCanvas("c","c",0,0,500,500);
3 c->Range(-11,-11,11,11);
4
5 auto f2 = new TF1("x2","x*x",-10,10);
6 f2->SetLineColor(kRed);
7 f2->Draw("same");
8
9 auto f3 = new TF1("x3","x*x*x",-10,10);
10 f3->SetLineColor(kBlue);
11 f3->Draw("same");
12
13 // Draw the axis with arrows
14 auto ox = new TGaxis(-10,0,10,0,-10.,10.,510,"+-S>");
15 ox->SetTickSize(0.009);
16 ox->SetLabelFont(42);
17 ox->SetLabelSize(0.025);
18 ox->Draw();
19 auto oy = new TGaxis(0,-10,0,10,-10,10,510,"+-S>");
20 oy->SetTickSize(0.009);
21 oy->SetLabelFont(42);
22 oy->SetLabelSize(0.025);
23 oy->Draw();
24}
#define c(i)
Definition RSha256.hxx:101
@ kRed
Definition Rtypes.h:67
@ kBlue
Definition Rtypes.h:67
auto ox
Definition TGaxis_002.C:14
auto f3
Definition TGaxis_002.C:9
auto oy
Definition TGaxis_002.C:19
auto f2
Definition TGaxis_002.C:5
The Canvas class.
Definition TCanvas.h:23
1-Dim function class
Definition TF1.h:182