This macro generates really large RH1D histogram, fills it with predefined pattern and draw it in a RCanvas, using Optmize() drawing mode.
#include "ROOT/RFrameTitle.hxx"
void rh1_large()
{
const int nbins = 5000000;
auto pHist = std::make_shared<RH1D>(xaxis);
auto frame = canvas->AddFrame();
frame->gridX = true;
frame->gridY = true;
frame->x.zoomMin = nbins*0.2;
frame->x.zoomMax = nbins*0.8;
auto draw = canvas->Draw(pHist);
draw->Hist();
draw->optimize = true;
canvas->SetSize(1000, 700);
canvas->Show();
}
RAttrValue< RColor > color
! fill color
Objects used to configure the different axis types.
static std::shared_ptr< RCanvas > Create(const std::string &title)
Create new canvas instance.
static R__DLLEXPORT constexpr RGB_t kLime
static R__DLLEXPORT constexpr RGB_t kBlue
RAttrFill fill
! fill attributes
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
- Date
- 2020-07-02
- Warning
- This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
- Author
- Sergey Linev s.lin.nosp@m.ev@g.nosp@m.si.de
Definition in file rh1_large.cxx.