24#include "ROOT/RFrameTitle.hxx"
26#include "ROOT/RMarker.hxx"
30auto symlog_style = RStyle::Parse(
"frame { margins_left: 0.1; }"
31 "title { margin: 0.01; height: 0.1; }"
32 "marker { onframe: true; clipping: true; }"
33 ".group1 { marker_style: 8; marker_color: blue; }"
34 ".group2 { marker_style: 8; marker_color: orange; }");
39 auto canvas = RCanvas::Create(
"Drawing with symlog");
41 auto pads = canvas->Divide(1, 3);
44 auto frame1 = pads[0][0]->AddFrame();
45 frame1->drawAxes =
true;
48 frame1->x.title =
"x linear";
49 frame1->x.title.SetCenter();
53 frame1->y.title =
"y log";
54 frame1->y.title.SetCenter();
55 pads[0][0]->Draw<RFrameTitle>(
"linear scale");
58 auto frame2 = pads[0][1]->AddFrame();
59 frame2->drawAxes =
true;
62 frame2->x.max = 1.2e3;
63 frame2->x.title =
"x log";
64 frame2->x.title.SetCenter();
68 frame2->y.title =
"y log";
69 frame2->y.title.SetCenter();
70 pads[0][1]->Draw<RFrameTitle>(
"log scale, missing points");
73 auto frame3 = pads[0][2]->AddFrame();
74 frame3->drawAxes =
true;
76 frame3->x.symlog = 10.;
78 frame3->x.max = 1.2e3;
79 frame3->x.title =
"x symlog";
80 frame3->x.title.SetCenter();
84 frame3->y.title =
"y log";
85 frame3->y.title.SetCenter();
86 pads[0][2]->Draw<RFrameTitle>(
"symlog scale");
88 for (
int n=0;
n<100;
n++) {
92 if (
n % 27 == 0) {
x1 = 100; y1 *= 100; }
95 pads[0][0]->Draw<RMarker>(pm)->SetCssClass(
"group1");
96 pads[0][1]->Draw<RMarker>(pm)->SetCssClass(
"group1");
97 pads[0][2]->Draw<RMarker>(pm)->SetCssClass(
"group1");
100 for (
int n=0;
n<75;
n++) {
105 pads[0][0]->Draw<RMarker>(pm)->SetCssClass(
"group2");
106 pads[0][1]->Draw<RMarker>(pm)->SetCssClass(
"group2");
107 pads[0][2]->Draw<RMarker>(pm)->SetCssClass(
"group2");
110 canvas->UseStyle(symlog_style);
112 canvas->SetSize(500, 900);
static const double x2[5]
static const double x1[5]
R__EXTERN TRandom * gRandom
A position (horizontal and vertical) in a RPad.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
LongDouble_t Power(LongDouble_t x, LongDouble_t y)