14 TCanvas *
c1 =
new TCanvas(
"c1",
"Various options on LOG scales plots", 0, 0, 700, 900);
17 TPad *
pad1 =
new TPad(
"pad1",
"pad1", 0.03, 0.62, 0.50, 0.92, 32);
18 TPad *
pad2 =
new TPad(
"pad2",
"pad2", 0.51, 0.62, 0.98, 0.92, 33);
19 TPad *
pad3 =
new TPad(
"pad3",
"pad3", 0.03, 0.02, 0.97, 0.535, 38);
30 pave->SetFillColor(42);
31 pave->SetTextAlign(12);
32 pave->SetTextFont(42);
33 pave->AddText(
"When more Log labels are requested, the overlapping labels are removed");
39 TF1 *
f1 =
new TF1(
"f1",
"x*sin(x)*exp(-0.1*x)+15", -10., 10.);
40 TF1 *f2 =
new TF1(
"f2",
"(sin(x)+cos(x))**5+15", -10., 10.);
41 TF1 *f3 =
new TF1(
"f3",
"(sin(x)/(x)-x*cos(x))+15", -10., 10.);
53 pave1->SetFillColor(42);
54 pave1->SetTextAlign(12);
55 pave1->SetTextFont(42);
56 pave1->AddText(
"Log scale along Y axis.");
57 pave1->AddText(
"More Log labels requested.");
61 double x[10] = {200, 300, 400, 500, 600, 650, 700, 710, 900, 1000};
62 double y[10] = {200, 1000, 900, 400, 500, 250, 800, 150, 201, 220};
65 g_2->SetMarkerColor(2);
66 g_2->GetYaxis()->SetMoreLogLabels();
67 g_2->GetYaxis()->SetNoExponent();
69 g_2->GetXaxis()->SetMoreLogLabels();
73 pave2->SetFillColor(42);
74 pave2->SetTextFont(42);
75 pave2->SetTextAlign(12);
76 pave2->AddText(
"Log scale along X and Y axis.");
77 pave2->AddText(
"More Log labels on both.");
78 pave2->AddText(
"No exponent along Y axis.");
86 TF1 *f4 =
new TF1(
"f4a",
"x*sin(x+10)+25", 1, 21);
92 f4 =
new TF1(
"f4b",
"x*cos(x+10)*sin(x+10)+25", 1, 21);
97 for (
int i =
a; i >= 1; i--) {
98 f4 =
new TF1(
Form(
"f4b_%d", i),
"x*sin(x+10)*[0]/[1]+25", 1, 21);
105 f4 =
new TF1(
Form(
"f4c_%d", i),
"x*cos(x+10)*sin(x+10)*[0]/[1]+25", 1, 25);
114 pave3->SetFillColor(42);
115 pave3->AddText(
"Log scale along X and Y axis.");
116 pave3->SetTextFont(42);
117 pave3->SetTextAlign(12);
118 pave3->AddText(
"More Log labels on both.");
119 pave3->AddText(
"The labels have no exponents (they would be 0 or 1)");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
void SetMoreLogLabels(Bool_t more=kTRUE)
Set the kMoreLogLabels bit flag When this option is selected more labels are drawn when in log scale ...
TAxis * GetYaxis() const
Get y axis of the function.
virtual void SetNpx(Int_t npx=100)
Set the number of points used to draw the function.
void Draw(Option_t *option="") override
Draw this function with its current attributes.
virtual void SetParameter(Int_t param, Double_t value)
TAxis * GetXaxis() const
Get x axis of the function.
A TGraph is an object made of two arrays X and Y with npoints each.
The most important graphics class in the ROOT system.
A Pave (see TPave) with a text centered in the Pave.
void Draw(Option_t *option="") override
Draw this pavelabel with its current attributes.
A Pave (see TPave) with text, lines or/and boxes inside.