Logarithmic scales support in web canvas.
Shows support of log2, ln, log8 and log25 scales Any integer base for logarithm can be specified as well
Functionality available only in web-based graphics
void logN()
{
auto h1 =
new TH1I(
"hist",
"Random data", 100, -5, 5);
auto c1 =
new TCanvas(
"c1",
"Logarithmic scales", 1200, 800);
if (!
gROOT->IsBatch() && !
c1->IsWeb())
::Warning(
"logN.cxx",
"macro will not work without enabling web-based canvas");
c1->GetPad(1)->SetLogy(2);
c1->GetPad(1)->Add(
h1,
"");
c1->GetPad(2)->SetLogy(3);
c1->GetPad(2)->Add(
h1,
"l");
c1->GetPad(3)->SetLogy(8);
c1->GetPad(3)->Add(
h1,
"c");
c1->GetPad(4)->SetLogy(25);
c1->GetPad(4)->Add(
h1,
"E");
}
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
1-D histogram with an int per channel (see TH1 documentation)
virtual void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr)
- Author
- Sergey Linev
Definition in file logN.cxx.