24#include "ROOT/RFrameTitle.hxx"
35 auto pHist1 = std::make_shared<RH1D>(xaxis);
36 auto pHist2 = std::make_shared<RH1D>(xaxis);
38 for (
int n=0;
n<1000;
n++)
41 for (
int n=0;
n<3000;
n++)
45 auto canvas = RCanvas::Create(
"RH1 with two Y scales");
48 auto col1 = RColor::kRed, col2 = RColor::kBlue;
51 canvas->Draw<RFrameTitle>(
"Two independent Y axes for histograms");
52 auto draw1 = canvas->Draw(pHist1);
53 draw1->line.color = col1;
54 draw1->line.width = 2;
55 auto draw2 = canvas->Draw(pHist2);
56 draw2->secondy =
true;
57 draw2->line.color = col2;
58 draw2->line.width = 4;
60 canvas->GetFrame()->y.ticks.color = col1;
61 canvas->GetFrame()->y2.ticks.color = col2;
63 canvas->SetSize(800, 600);
R__EXTERN TRandom * gRandom
Objects used to configure the different axis types.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...