24#include "ROOT/RFrameTitle.hxx"
39 auto pHist1 = std::make_shared<RH1D>(xaxis);
40 auto pHist2 = std::make_shared<RH1D>(xaxis);
42 for (
int n=0;
n<1000;
n++)
45 for (
int n=0;
n<3000;
n++)
49 auto canvas = RCanvas::Create(
"RH1 with two Y scales");
52 auto col1 = RColor::kRed, col2 = RColor::kBlue;
55 canvas->Draw<RFrameTitle>(
"Two independent Y axes for histograms");
56 auto draw1 = canvas->Draw(pHist1);
57 draw1->line.color = col1;
58 draw1->line.width = 2;
59 auto draw2 = canvas->Draw(pHist2);
60 draw2->secondy =
true;
61 draw2->line.color = col2;
62 draw2->line.width = 4;
64 canvas->GetFrame()->y.ticks.color = col1;
65 canvas->GetFrame()->y2.ticks.color = col2;
67 canvas->SetSize(800, 600);
#define R__LOAD_LIBRARY(LIBRARY)
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...