56#define ROOT_Hoption_cxx
58#define ROOT_Hparam_cxx
3281 const Int_t big = 9999;
3282 const Int_t kMaxDiff = 7;
3285 return fPie->DistancetoPrimitive(px, py);
3294 Int_t curdist = big;
3295 Int_t yxaxis, dyaxis,xyaxis, dxaxis;
3298 if (!PadPointer)
return 0;
3312 if (d3 <= kMaxDiff) {
gPad->SetSelected(
fZaxis);
return 0;}
3314 if (d1 <= kMaxDiff) {
gPad->SetSelected(
fXaxis);
return 0;}
3316 if (d2 <= kMaxDiff) {
gPad->SetSelected(
fYaxis);
return 0;}
3317 if ( px > puxmin && px < puxmax && py > puymax && py < puymin) curdist = 1;
3328 if (px <= xyaxis+dyaxis && px >= xyaxis && py >puymax && py < puymin) {
3337 if (px >= xyaxis-dyaxis && px <= xyaxis && py >puymax && py < puymin) {
3349 if (py >= yxaxis-dxaxis && py <= yxaxis && px <puxmax && px > puxmin) {
3358 if (yxaxis < puymin) yxaxis = puymin;
3359 if (py <= yxaxis+dxaxis && py >= yxaxis && px <puxmax && px > puxmin) {
3369 if ((px > puxmin) && (py < puymin) && (px < puxmax) && (py > puymax))
3385 Int_t bin =
th2->FindBin(pxu, pyu);
3386 if (bin>0) curdist = 1;
3392 if ( px > puxmin + delta2
3393 && px < puxmax - delta2
3394 && py > puymax + delta2
3395 && py < puymin - delta2) {curdist =1;
goto FUNCTIONS;}
3399 if (
gPad->IsVertical()) {
3404 if (binval == 0 && pybin < puymin) pybin = 10000;
3410 for (
Int_t ibin=bin+1; ibin<binsup; ibin++) {
3412 if (binvalmin>binvaltmp) binvalmin=binvaltmp;
3413 if (binvalmax<binvaltmp) binvalmax=binvaltmp;
3415 Int_t pybinmin =
gPad->YtoAbsPixel(
gPad->YtoPad(binvalmax));
3416 Int_t pybinmax =
gPad->YtoAbsPixel(
gPad->YtoPad(binvalmin));
3417 if (py<pybinmax+kMaxDiff/2 && py>pybinmin-kMaxDiff/2) pybin = py;
3419 if (bin != binsup) {
3421 Int_t pybinsub =
gPad->YtoAbsPixel(
gPad->YtoPad(binsupval));
3422 if (py <=
TMath::Max(pybinsub,pybin) && py >=
TMath::Min(pybinsub,pybin) && pybin != 10000)
return 0;
3432 if (binval == 0 && pxbin > puxmin) pxbin = 10000;
3438 for (
Int_t ibin=bin+1; ibin<binsup; ibin++) {
3440 if (binvalmin>binvaltmp) binvalmin=binvaltmp;
3441 if (binvalmax<binvaltmp) binvalmax=binvaltmp;
3443 Int_t pxbinmin =
gPad->XtoAbsPixel(
gPad->XtoPad(binvalmax));
3444 Int_t pxbinmax =
gPad->XtoAbsPixel(
gPad->XtoPad(binvalmin));
3445 if (px<pxbinmax+kMaxDiff/2 && px>pxbinmin-kMaxDiff/2) pxbin = px;
3455 if (
f->InheritsFrom(
TF1::Class())) dist =
f->DistancetoPrimitive(-px,py);
3456 else dist =
f->DistancetoPrimitive(px,py);
3457 if (dist < kMaxDiff) {
gPad->SetSelected(
f);
return dist;}
3470 Error(
"DrawPanel",
"need to draw histogram first");
3475 gROOT->ProcessLine(
TString::Format(
"((TCanvas*)0x%zx)->Selected((TVirtualPad*)0x%zx,(TObject*)0x%zx,1)",
3498 const char *opt = parent.
OpaqueMoving() ?
"izoombox" :
"ilzoombox";
3540 auto &parent = *
gPad;
3543 TView *view = parent.GetView();
3549 Bool_t opaque = parent.OpaqueMoving();
3558 if (hopt.
Index(
"same") >= 0) {
3559 TIter next(parent.GetListOfPrimitives());
3560 while (
auto obj = next()) {
3561 if (
auto h1 =
dynamic_cast<TH1 *
>(obj)) {
3587 if ((dimension == 1) &&
gROOT->GetEditHistograms()) {
3595 h1edit->xup = h1edit->xlow + barwidth*binwidth;
3598 if (!h1edit->factor)
3599 h1edit->factor = 1.;
3608 if ((dimension == 1) && h1edit) {
3609 Double_t yup = parent.PadtoY(parent.AbsPixeltoY(py)) / h1edit->factor;
3613 parent.PaintBox(parent.XtoPad(h1edit->xlow), parent.YtoPad(h1edit->y0), parent.XtoPad(h1edit->xup), parent.YtoPad(yup),
"ilh1edit");
3614 parent.UpdateAsync();
3619 if (zoombox && dimension == 2)
3626 if (dimension == 2) {
3643 if (dimension == 2) {
3649 if (resetXaxisRange)
3656 if (resetYaxisRange)
3665 if ((dimension == 1) && h1edit) {
3670 if ((dimension == 2) && zoombox)
3671 zoombox->ChangeRange(xaxis, yaxis);
3672 parent.FreeInteractive(
this);
3683 event = parent.GetCanvasImp()->RequestLocator(px, py);
3707 if (!dt && !dtOld)
return nullptr;
3712 ((
THistPainter*)
this)->fGraph2DPainter = dt ? std::make_unique<TGraph2DPainter>(dt) : std::make_unique<TGraph2DPainter>(dtOld);
3724 if (!
gPad)
return (
char*)
"";
3734 if (
gPad->GetView() || drawOption.
Index(
"cont") >= 0) {
3735 uxmin=
gPad->GetUxmin();
3736 uxmax=
gPad->GetUxmax();
3740 uymin=
gPad->GetUymin();
3741 uymax=
gPad->GetUymax();
3747 Int_t binx,biny,binmin=0,binx1;
3748 if (
gPad->IsVertical()) {
3750 if (drawOption.
Index(
"same") >= 0) {
3752 TIter next(
gPad->GetListOfPrimitives());
3753 while ((
h1 = (
TH1 *)next())) {
3766 for (
Int_t ibin=binx+1; ibin<binx1; ibin++) {
3778 if (drawOption.
Index(
"same") >= 0) {
3780 TIter next(
gPad->GetListOfPrimitives());
3781 while ((
h1 = (
TH1 *)next())) {
3794 for (
Int_t ibin=binx+1; ibin<binx1; ibin++) {
3820 biny =
th2->FindBin(
x,
y);
3822 th2->GetBinTitle(biny),
x,
y,biny,
th2->GetBinContent(biny));
3828 fObjectInfo.
Form(
"(x=%g, y=%g, binx=%d, biny=%d, binc=%g, bine=%g, binn=%d)",
3884 if (!changedBin)
return;
3910 if (
gPad->GetLogx()) {
3914 if (
gPad->GetLogy()) {
3921 if (
gPad->IsVertical()) {
3923 if ((hcenter < uxmin) || (hcenter > uxmax))
return;
3926 if ((hcenter < uymin) || (hcenter > uymax))
return;
3930 if ((hcenter < uymin) || (hcenter > uymax))
return;
3935 if (
gPad->IsVertical()) {
4025 Int_t nch = strlen(choptin);
4026 strlcpy(chopt,choptin,128);
4054 for (
Int_t i=0;i<nch;i++) chopt[i] = toupper(chopt[i]);
4060 char *l1 = strstr(chopt,
"PFC");
4061 char *l2 = strstr(chopt,
"PLC");
4062 char *l3 = strstr(chopt,
"PMC");
4063 if (l1 || l2 || l3) {
4071 l = strstr(chopt,
"MIN0");
4077 l = strstr(chopt,
"SPEC");
4082 l = strstr(chopt,
"BF(");
4084 if (sscanf(&
l[3],
"%d",&bs) > 0) {
4097 l = strstr(chopt,
"GL");
4101 l = strstr(chopt,
"X+");
4106 l = strstr(chopt,
"Y+");
4114 l = strstr(chopt,
"SAMES");
4121 l = strstr(chopt,
"SAME");
4129 l = strstr(chopt,
"SCAT");
4131 Warning(
"MakeChopt",
"option SCAT is deprecated.");
4137 l = strstr(chopt,
"PIE");
4144 l = strstr(chopt,
"CANDLE");
4151 l = strstr(chopt,
"VIOLIN");
4158 l = strstr(chopt,
"LEGO");
4169 l = strstr(chopt,
"0");
if (
l) {
Hoption.
Zero = 1; memcpy(
l,
" ",1); }
4172 l = strstr(chopt,
"SURF");
4187 l = strstr(chopt,
"TF3");
4194 l = strstr(chopt,
"ISO");
4202 l = strstr(chopt,
"LIST");
if (
l) {
Hoption.
List = 1; memcpy(
l,
" ",4);}
4204 l = strstr(chopt,
"CONT");
4219 l = strstr(chopt,
"HBAR");
4228 l = strstr(chopt,
"BAR");
4238 l = strstr(chopt,
"ARR" );
4244 l = strstr(chopt,
"COL");
if (
l) {
Hoption.
Arrow = 2; memcpy(
l,
" ",3); }
4250 l = strstr(chopt,
"BOX" );
4263 l = strstr(chopt,
"TEXT");
4266 if (sscanf(&
l[4],
"%d",&
angle) > 0) {
4274 l = strstr(chopt,
"N");
4278 l = strstr(chopt,
"COLZ");
4282 explicitColor =
kTRUE;
4286 l = strstr(chopt,
"0");
if (
l) {
Hoption.
Zero = 1; memcpy(
l,
" ",1); }
4292 l = strstr(chopt,
"COL" );
4296 explicitColor =
kTRUE;
4299 l = strstr(chopt,
"0");
if (
l) {
Hoption.
Zero = 1; memcpy(
l,
" ",1); }
4307 l = strstr(chopt,
"AXIS");
if (
l) {
Hoption.
Axis = 1; memcpy(
l,
" ",4); }
4308 l = strstr(chopt,
"AXIG");
if (
l) {
Hoption.
Axis = 2; memcpy(
l,
" ",4); }
4309 l = strstr(chopt,
"SCAT");
if (
l) {
Hoption.
Scat = 1; memcpy(
l,
" ",4); }
4317 l = strstr(chopt,
"TRI");
4323 l = strstr(chopt,
"ERR");
if (
l) memcpy(
l,
" ",3);
4326 l = strstr(chopt,
"AITOFF");
4330 l = strstr(chopt,
"MERCATOR");
4334 l = strstr(chopt,
"SINUSOIDAL");
4338 l = strstr(chopt,
"PARABOLIC");
4342 l = strstr(chopt,
"MOLLWEIDE");
4368 if (strstr(chopt,
"E")) {
4378 if (strstr(chopt,
"X0")) {
4401 Warning(
"MakeChopt",
"option SURF5 is not supported in Cartesian and Polar modes");
4422 char *left = (
char*)strchr(choptin,
'[');
4423 if (!left)
return 0;
4424 char *right = (
char*)strchr(choptin,
']');
4425 if (!right)
return 0;
4426 Int_t nch = right-left;
4427 if (nch < 2)
return 0;
4428 char *cuts = left+1;
4430 char *comma, *minus;
4433 comma = strchr(cuts,
',');
4434 if (comma) *comma = 0;
4435 minus = strchr(cuts,
'-');
4436 if (minus) cuts = minus+1;
4437 while (*cuts ==
' ') cuts++;
4438 Int_t nc = strlen(cuts);
4439 while (cuts[nc-1] ==
' ') {cuts[nc-1] = 0; nc--;}
4443 while ((obj = next())) {
4445 if (strcmp(obj->
GetName(),cuts))
continue;
4458 for (i=0;i<=nch;i++) left[i] =
' ';
4486 gROOT->ProcessLineFast(
TString::Format(
"TSpectrum2Painter::PaintSpectrum((TH2F*)0x%zx,\"%s\",%d)",
4499 fPie = std::make_unique<TPie>(
fH);
4502 Error(
"Paint",
"Option PIE is for 1D histograms only");
4536 Int_t logysav=0, logzsav=0;
4573 gPad->RangeAxisChanged();
4591 if (gridx)
gPad->SetGridx(0);
4592 if (gridy)
gPad->SetGridy(0);
4594 if (gridx)
gPad->SetGridx(1);
4595 if (gridy)
gPad->SetGridy(1);
4630 if (gridx)
gPad->SetGridx(0);
4631 if (gridy)
gPad->SetGridy(0);
4633 if (gridx)
gPad->SetGridx(1);
4634 if (gridy)
gPad->SetGridy(1);
4643 while ((obj = next())) {
4651 if (!
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode())
4678 arrow->SetAngle(30);
4679 arrow->SetFillStyle(1001);
4685 Int_t ncolors=0, ndivz=0;
4699 for (
Int_t id=1;
id<=2;
id++) {
4706 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
4724 }
else if (
id == 2) {
4736 if (theColor > ncolors-1) theColor = ncolors-1;
4766 if (drawGridOnly && (
gPad->PadInHighlightMode() ||
gPad->PadInSelectionMode()))
4774 TAxis *xaxis =
nullptr;
4775 TAxis *yaxis =
nullptr;
4778 TIter next(
gPad->GetListOfPrimitives());
4781 while ((obj = next())) {
4787 if (strstr(opt,
"hbar")) {
4791 if (!strcmp(xaxis->
GetName(),
"xaxis")) {
4801 static char chopt[10] =
"";
4803 Int_t ndiv, ndivx, ndivy, nx1, nx2, ndivsave;
4804 Int_t useHparam = 0;
4805 Double_t umin, umax, uminsave, umaxsave;
4821 TIter next(
gPad->GetListOfPrimitives());
4822 while ((obj=next())) {
4833 if (
gPad->PadInSelectionMode())
4837 if (
gPad->PadInSelectionMode() || !
gPad->PadInHighlightMode() || (
gPad->PadInHighlightMode() &&
gPad->GetSelected() ==
fXaxis)) {
4848 strlcat(chopt,
"SDH",10);
4849 if (ndivx < 0) strlcat(chopt,
"N",10);
4850 if (
gPad->GetGridx()) {
4851 gridl = (aymax-aymin)/(
gPad->GetY2() -
gPad->GetY1());
4852 strlcat(chopt,
"W",10);
4857 strlcat(chopt,
"G",10);
4879 strlcat(chopt,
"t",10);
4887 if (xAxisPos == 1) {
4903 strlcat(chopt,
"-",10);
4912 umin, umax, ndiv, chopt, gridl, drawGridOnly);
4917 if (
gPad->GetTickx() && !
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode()) {
4919 cw=strstr(chopt,
"-");
4922 strlcat(chopt,
"-",10);
4924 if (
gPad->GetTickx() < 2) strlcat(chopt,
"U",10);
4925 if ((cw=strstr(chopt,
"W"))) *cw=
'z';
4929 uminsave, umaxsave, ndivsave, chopt, gridl, drawGridOnly);
4935 if (
gPad->PadInSelectionMode())
4939 if (
gPad->PadInSelectionMode() || !
gPad->PadInHighlightMode() || (
gPad->PadInHighlightMode() &&
gPad->GetSelected() ==
fYaxis)) {
4944 strlcat(chopt,
"SDH",10);
4945 if (ndivy < 0) strlcat(chopt,
"N",10);
4946 if (
gPad->GetGridy()) {
4947 gridl = (axmax-axmin)/(
gPad->GetX2() -
gPad->GetX1());
4948 strlcat(chopt,
"W",10);
4953 strlcat(chopt,
"G",10);
4975 strlcat(chopt,
"t",10);
4983 if (yAxisPos == 1) {
4999 strlcat(chopt,
"+L",10);
5008 umin, umax, ndiv, chopt, gridl, drawGridOnly);
5013 if (
gPad->GetTicky() && !
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode()) {
5014 if (
gPad->GetTicky() < 2) {
5015 strlcat(chopt,
"U",10);
5018 strlcat(chopt,
"+L",10);
5020 if ((cw=strstr(chopt,
"W"))) *cw=
'z';
5024 uminsave, umaxsave, ndivsave, chopt, gridl, drawGridOnly);
5047 if (hcolor ==
gPad->GetFrameFillColor()) ++hcolor;
5049 box.SetFillColor(hcolor);
5050 box.SetFillStyle(hstyle);
5060 if (ymax < gPad->GetUymin())
continue;
5062 if (ymin < gPad->GetUymin())
ymin =
gPad->GetUymin();
5075 box.SetFillColor(hcolor);
5095 if (!strcmp(xaxis->
GetName(),
"xaxis")) {
5109 if (hcolor ==
gPad->GetFrameFillColor()) ++hcolor;
5111 box.SetFillColor(hcolor);
5112 box.SetFillStyle(hstyle);
5121 if (xmax < gPad->GetUxmin())
continue;
5123 if (xmin < gPad->GetUxmin())
xmin =
gPad->GetUxmin();
5136 box.SetFillColor(hcolor);
5149 while ((obj = next())) {
5170 fH->TAttLine::Modify();
5171 fH->TAttFill::Modify();
5173 Double_t z, xk,xstep, yk, ystep, xcent, ycent, xlow, xup, ylow, yup;
5184 Double_t zminlin = zmin, zmaxlin = zmax;
5190 TIter next(
gPad->GetListOfPrimitives());
5191 while ((h2 = (
TH2 *)next())) {
5241 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
5248 if (kZminNeg && z==0)
continue;
5260 if (dz == 0)
continue;
5262 if (zratio == 0)
continue;
5264 xup = xcent*zratio + xk + xcent;
5265 xlow = 2*(xk + xcent) - xup;
5266 if (xup-xlow < dxmin) xup = xlow+dxmin;
5274 yup = ycent*zratio + yk + ycent;
5275 ylow = 2*(yk + ycent) - yup;
5276 if (yup-ylow < dymin) yup = ylow+dymin;
5289 if (xlow >= xup)
continue;
5290 if (ylow >= yup)
continue;
5294 fH->TAttFill::Modify();
5295 gPad->PaintBox(xlow, ylow, xup, yup);
5297 gPad->PaintLine(xlow, ylow, xup, yup);
5298 gPad->PaintLine(xlow, yup, xup, ylow);
5303 fH->TAttFill::Modify();
5304 gPad->PaintBox(xlow, ylow, xup, yup);
5309 x[0] = xlow;
y[0] = ylow;
5310 x[1] = xlow + bwidth*(xup-xlow);
y[1] = ylow + bwidth*(yup-ylow);
5311 x[2] =
x[1];
y[2] = yup - bwidth*(yup-ylow);
5312 x[3] = xup - bwidth*(xup-xlow);
y[3] =
y[2];
5313 x[4] = xup;
y[4] = yup;
5314 x[5] = xlow;
y[5] = yup;
5315 x[6] = xlow;
y[6] = ylow;
5318 fH->TAttFill::Modify();
5319 gPad->PaintFillArea(7,
x,
y);
5322 x[0] = xlow;
y[0] = ylow;
5323 x[1] = xlow + bwidth*(xup-xlow);
y[1] = ylow + bwidth*(yup-ylow);
5324 x[2] = xup - bwidth*(xup-xlow);
y[2] =
y[1];
5325 x[3] =
x[2];
y[3] = yup - bwidth*(yup-ylow);
5326 x[4] = xup;
y[4] = yup;
5327 x[5] = xup;
y[5] = ylow;
5328 x[6] = xlow;
y[6] = ylow;
5331 fH->TAttFill::Modify();
5332 gPad->PaintFillArea(7,
x,
y);
5340 fH->TAttFill::Modify();
5350 TH1D *hproj =
nullptr;
5365 const Double_t standardCandleWidth = 0.66;
5366 const Double_t standardHistoWidth = 0.8;
5368 double allMaxContent = 0, allMaxIntegral = 0;
5377 if (hproj->
Integral() > allMaxIntegral) allMaxIntegral = hproj->
Integral();
5387 double myIntegral = hproj->
Integral();
5389 if (candleWidth > 0.999 && candleWidth < 1.001) {
5390 candleWidth = standardCandleWidth;
5391 histoWidth = standardHistoWidth;
5395 if (myCandle.
IsViolinScaled() && myMaxContent > 0 && allMaxContent > 0)
5398 histoWidth *= myMaxContent/allMaxContent;
5400 candleWidth *= myIntegral/allMaxIntegral;
5414 if (hproj->
Integral() > allMaxIntegral) allMaxIntegral = hproj->
Integral();
5424 double myIntegral = hproj->
Integral();
5426 if (candleWidth > 0.999 && candleWidth < 1.001) {
5427 candleWidth = standardCandleWidth;
5428 histoWidth = standardHistoWidth;
5432 if (myCandle.
IsViolinScaled() && myMaxContent > 0 && allMaxContent > 0)
5435 histoWidth *= myMaxContent/allMaxContent;
5437 candleWidth *= myIntegral/allMaxIntegral;
5466std::vector<THistRenderingRegion>
5469 std::vector<THistRenderingRegion> regions;
5471 enum STRATEGY { Bins, Pixels } strategy;
5475 if (nBins >= nPixels) {
5487 while (xMin <= 0 && ((pAxis->
GetFirst()+binOffset) != pAxis->
GetLast()) ) {
5497 if (strategy == Bins) {
5515 std::make_pair(bin, bin+1)};
5516 regions.push_back(region);
5525 for (
Int_t pixelIndex=0; pixelIndex<(nPixels-1); pixelIndex++) {
5530 std::make_pair(binLow, binHigh)};
5531 regions.push_back(region);
5537 if (strategy == Bins) {
5544 Int_t xPx1 = xPx0 + nPixels/nBins;
5547 if (xPx1>= nPixels) xPx1 = nPixels-1;
5550 std::make_pair(bin, bin+1)};
5551 regions.push_back(region);
5555 for (
Int_t pixelIndex=0; pixelIndex<nPixels-1; pixelIndex++) {
5557 Int_t binLow = (nBins*pixelIndex)/nPixels + pAxis->
GetFirst();
5558 Int_t binHigh = binLow + nBins/nPixels;
5560 std::make_pair(binLow, binHigh)};
5561 regions.push_back(region);
5576 Error(
"THistPainter::PaintColorLevelsFast(Option_t*)",
5577 "Only cartesian coordinates supported by 'COL2' option. Using 'COL' option instead.");
5590 if ((zmin == -1111) && (zmax == -1111)) {
5594 }
else if (zmin == -1111) {
5597 }
else if (zmax == -1111) {
5615 Error(
"THistPainter::PaintColorLevelsFast(Option_t*)",
5616 "Cannot plot logz because bin content is less than 0.");
5627 std::vector<Double_t> colorBounds(ndiv);
5628 std::vector<Double_t> contours(ndiv, 0);
5636 for (
Int_t i=0; i<ndiv; ++i) {
5637 colorBounds[i] = step*i;
5640 auto pFrame =
gPad->GetFrame();
5641 Int_t px0 =
gPad->XtoPixel(pFrame->GetX1());
5642 Int_t px1 =
gPad->XtoPixel(pFrame->GetX2());
5643 Int_t py0 =
gPad->YtoPixel(pFrame->GetY1());
5644 Int_t py1 =
gPad->YtoPixel(pFrame->GetY2());
5645 Int_t nXPixels = px1-px0;
5646 Int_t nYPixels = py0-py1;
5648 std::vector<Double_t> buffer(nXPixels*nYPixels, 0);
5652 if (xRegions.empty() || yRegions.empty()) {
5653 Error(
"THistPainter::PaintColorLevelFast(Option_t*)",
5654 "Encountered error while computing rendering regions.");
5662 for (
auto& yRegion : yRegions) {
5663 for (
auto& xRegion : xRegions ) {
5665 const auto& xBinRange = xRegion.fBinRange;
5666 const auto& yBinRange = yRegion.fBinRange;
5677 if (z > zmax) z = zmax;
5678 if (z < zmin) z = zmin;
5683 z = colorBounds[
index];
5687 index = 0.001 + ((z - zmin)/dz)*ndiv;
5690 if (
index ==
static_cast<Int_t>(colorBounds.size())) {
5698 }
else if (
index ==
static_cast<Int_t>(colorBounds.size()-1)) {
5702 z = colorBounds[
index];
5713 const auto& xPixelRange = xRegion.fPixelRange;
5714 const auto& yPixelRange = yRegion.fPixelRange;
5715 for (
Int_t xPx = xPixelRange.first; xPx <= xPixelRange.second; ++xPx) {
5716 for (
Int_t yPx = yPixelRange.first; yPx <= yPixelRange.second; ++yPx) {
5728 if (minValue != maxValue) {
5734 buffer[buffer.size()-nXPixels] = 0.95;
5742 pImage->
SetImage(buffer.data(), nXPixels, nYPixels, pPalette);
5745 auto pp =
gPad->GetPainter();
5747 pp->DrawImage(pImage, px0, py1);
5766 Double_t z,
e, zc, xk, xstep, yk, ystep, xlow, xup, ylow, yup;
5782 TIter next(
gPad->GetListOfPrimitives());
5783 while ((h2 = (
TH2 *)next())) {
5815 fH->TAttFill::Modify();
5826 Double_t scale = (dz ? ndivz / dz : 1.0);
5858 }
else if ((pymax > 0) && (pymin > 0)) {
5882 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
5888 if (binEntries == 0)
5893 if (z == 0 &&
e == 0) {
5906 if ((xup <= 0) || (xlow <= 0))
5914 if ((yup <= 0) || (ylow <= 0))
5932 if (z < zc)
continue;
5934 for (
Int_t k=0; k<ndiv; k++) {
5947 if (theColor > ncolors-1)
5948 theColor = ncolors-1;
5952 fH->TAttFill::Modify();
5953 gPad->PaintBox(xlow, ylow, xup, yup);
5965 a1 = ((xlow - pxmin) / (pxmax - pxmin) - 0.5) * 360;
5966 a2 = ((xup - pxmin) / (pxmax - pxmin) - 0.5) * 360;
5968 Double_t r1 = (ylow - pymin) / (pymax - pymin) * rx * pkr;
5969 Double_t r2 = (yup - pymin) / (pymax - pymin) * rx * pkr;
5971 TCrown crown(midx, midy, r1, r2, a1, a2);
5986 fH->TAttFill::Modify();
5996 Int_t i, j, count, ncontour, icol,
n, lj,
m, ix, jx, ljfill;
5998 Double_t xsave, ysave, thesave,phisave,
x[4],
y[4], zc[4];
6003 thesave =
gPad->GetTheta();
6004 phisave =
gPad->GetPhi();
6006 gPad->SetTheta(90.);
6008 gPad->SetPhi(phisave);
6009 gPad->SetTheta(thesave);
6020 TIter next(
gPad->GetListOfPrimitives());
6021 while ((obj=next())) {
6038 if (!dt && !dtOld)
return;
6040 fGraph2DPainter = dt ? std::make_unique<TGraph2DPainter>(dt) : std::make_unique<TGraph2DPainter>(dtOld);
6056 if (ncontour == 0) {
6061 Warning(
"PaintContour",
"maximum number of contours is %d, asked for %d",
6072 fH->TAttLine::Modify();
6075 std::vector<std::unique_ptr<TPolyLine>> polys;
6077 TList *list =
nullptr;
6079 std::vector<Int_t>
np;
6081 np.resize(ncontour);
6082 for (i=0;i<ncontour;i++)
6084 for (i=0;i<ncontour;i++)
6085 polys.emplace_back(std::make_unique<TPolyLine>(100));
6089 gROOT->GetListOfSpecials()->Remove(contours);
6091 for (i=0;i<count;i++) {
6092 list = (
TList*)contours->
At(i);
6093 if (list) list->
Delete();
6099 contours->
SetName(
"contours");
6100 gROOT->GetListOfSpecials()->Add(contours);
6101 for (i=0;i<ncontour;i++) {
6103 contours->
Add(list);
6136 if (ir[0] != ir[1] || ir[1] != ir[2] || ir[2] != ir[3] || ir[3] != ir[0]) {
6141 if (zc[0] <= zc[1])
n = 0;
else n = 1;
6142 if (zc[2] <= zc[3])
m = 2;
else m = 3;
6143 if (zc[
n] > zc[
m])
n =
m;
6146 for (ix=1;ix<=4;ix++) {
6149 ir[
m-1],
x[
m-1],
y[
m-1], xarr.data()+lj-1,yarr.data()+lj-1,itarr.data()+lj-1, levels.data());
6154 if (zc[0] <= zc[1])
n = 0;
else n = 1;
6155 if (zc[2] <= zc[3])
m = 2;
else m = 3;
6156 if (zc[
n] > zc[
m])
n =
m;
6159 for (ix=1;ix<=4;ix++) {
6163 ir[
m-1],
x[
m-1],
y[
m-1],xarr.data()+lj-1,yarr.data()+lj-1,itarr.data()+lj-1, levels.data());
6171 for (ix=1; ix<=lj-5; ix +=2) {
6173 while (itarr[ix-1] != itarr[ix]) {
6177 for (jx=ix; jx<=lj-5; jx +=2) {
6178 xarr[jx] = xarr[jx+2];
6179 yarr[jx] = yarr[jx+2];
6180 itarr[jx] = itarr[jx+2];
6184 itarr[lj-3] = itars;
6185 if (count > 100)
break;
6190 if (count > 100)
continue;
6191 for (ix=1; ix<=lj-2; ix +=2) {
6203 fH->TAttLine::Modify();
6204 gPad->PaintPolyLine(2,xarr.data()+ix-1,yarr.data()+ix-1);
6209 ipoly = itarr[ix-1];
6210 if (ipoly >=0 && ipoly <ncontour) {
6211 polys[ipoly]->SetPoint(
np[ipoly] ,xarr[ix-1],yarr[ix-1]);
6212 polys[ipoly]->SetPoint(
np[ipoly]+1,xarr[ix], yarr[ix]);
6214 if (npmax <
np[ipoly]) npmax =
np[ipoly];
6222 std::vector<Double_t> xp, yp;
6223 Int_t nadd,iminus,iplus;
6225 Int_t first = ncontour;
6226 std::vector<Int_t> polysort;
6241 polysort.resize(ncontour);
6243 for (ipoly=0;ipoly<ncontour;ipoly++) {
6244 if (levels[ipoly] >= 0) {first = ipoly;
break;}
6248 for (ipoly=first-1;ipoly>=0;ipoly--) {polysort[k] = ipoly; k++;}
6249 for (ipoly=first;ipoly<ncontour;ipoly++) {polysort[k] = ipoly; k++;}
6253 for (k=0;k<ncontour;k++) {
6254 ipoly = polysort[k];
6259 Double_t *xx = polys[ipoly]->GetX();
6260 Double_t *yy = polys[ipoly]->GetY();
6265 xp[iminus]= xx[istart]; yp[iminus] = yy[istart];
6266 xp[iplus] = xx[istart+1]; yp[iplus] = yy[istart+1];
6267 xx[istart] =
xmin; yy[istart] =
ymin;
6268 xx[istart+1] =
xmin; yy[istart+1] =
ymin;
6271 for (i=2;i<
np[ipoly];i+=2) {
6272 if ((iplus < 2*npmax-1) && (xx[i] == xp[iplus]) && (yy[i] == yp[iplus])) {
6274 xp[iplus] = xx[i+1]; yp[iplus] = yy[i+1];
6279 if ((iminus > 0) && (xx[i+1] == xp[iminus]) && (yy[i+1] == yp[iminus])) {
6281 xp[iminus] = xx[i]; yp[iminus] = yy[i];
6287 if (nadd == 0)
break;
6293 fH->TAttFill::Modify();
6294 gPad->PaintFillArea(iplus-iminus+1,xp.data()+iminus,yp.data()+iminus);
6297 graph =
new TGraph(iplus-iminus+1,xp.data()+iminus,yp.data()+iminus);
6312 for (i=2;i<
np[ipoly];i+=2) {
6313 if (xx[i] !=
xmin && yy[i] !=
ymin) {
6318 if (istart == 0)
break;
6339 Double_t tlen, tdif, elev, diff, pdif, xlen;
6351 tdif = elev2 - elev1;
6357 diff = elev - elev1;
6368 yarr[i] =
y1 + xlen;
6373 xarr[i] =
x1 + xlen;
6396 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
return;
6398 const Int_t kBASEMARKER=8;
6399 Double_t xp, yp, ex1, ex2, ey1, ey2;
6401 Double_t s2x, s2y, bxsize, bysize, symbolsize, xerror, sbasex, sbasey;
6402 Double_t xi1, xi2, xi3, xi4, yi1, yi2, yi3, yi4;
6408 Int_t i, k, npoints, first, last, fixbin;
6413 Int_t option0, option1, option2, option3, option4, optionE, optionEX0, optionI0;
6414 static Float_t cxx[30] = {1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.6,1.0,0.5,0.5,1.0,0.5,0.6,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.5,0.5,0.5,1.0};
6415 static Float_t cyy[30] = {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.5,0.5,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.5,0.5,0.5,1.0};
6417 std::vector<Double_t> xline, yline, xsegm, ysegm, xmarker, ymarker;
6418 option0 = option1 = option2 = option3 = option4 = optionE = optionEX0 = optionI0 = 0;
6427 if (
Hoption.
Error == 16) {optionI0 = 1; option4 = 1; option3 = 1;}
6428 if (option2+option3 == 0) optionE = 1;
6443 if (errormarker == 1) symbolsize = 0.01;
6444 sbasex = sbasey = symbolsize*kBASEMARKER;
6445 if (errormarker >= 20 && errormarker <= 49) {
6446 sbasex *= cxx[errormarker-20];
6447 sbasey *= cyy[errormarker-20];
6451 fH->TAttLine::Modify();
6452 fH->TAttFill::Modify();
6453 fH->TAttMarker::Modify();
6460 npoints = last - first +1;
6466 xsegm.reserve(1024);
6467 ysegm.reserve(1024);
6468 if (!xsegm.capacity() || !ysegm.capacity()) {
6469 Error(
"PaintErrors",
"out of memory for lines painting");
6473 auto flush_segmentes = [&]() {
6474 if (xsegm.size() > 0) {
6475 gPad->PaintSegments(xsegm.size()/2, xsegm.data(), ysegm.data());
6482 xsegm.emplace_back(
x1);
6483 xsegm.emplace_back(
x2);
6484 ysegm.emplace_back(
y1);
6485 ysegm.emplace_back(
y2);
6486 if (xsegm.size() == xsegm.capacity())
6490 auto flush_markers = [&]() {
6491 if (xmarker.size() > 0) {
6492 gPad->PaintPolyMarker(xmarker.size(), xmarker.data(), ymarker.data());
6499 if (xmarker.capacity() == 0) {
6500 xmarker.reserve(256);
6501 ymarker.reserve(256);
6504 xmarker.emplace_back(
x);
6505 ymarker.emplace_back(
y);
6506 if (xmarker.size() == xmarker.capacity()) {
6514 xline.resize(2*npoints);
6515 yline.resize(2*npoints);
6516 if ((npoints > 0) && (xline.empty() || yline.empty())) {
6517 Error(
"PaintErrors",
"too many points, out of memory");
6525 s2x =
gPad->PixeltoX(
Int_t(0.5*sbasex)) -
gPad->PixeltoX(0);
6526 s2y =-
gPad->PixeltoY(
Int_t(0.5*sbasey)) +
gPad->PixeltoY(0);
6530 bxsize =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
6531 bysize =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
6547 for (k=first; k<=last; k++) {
6566 xminTmp +=
offset*(xmaxTmp-xminTmp);
6567 xmaxTmp = xminTmp +
w;
6568 xp = (xminTmp+xmaxTmp)/2.;
6571 if (xp <= 0)
goto L30;
6572 if (xp < logxmin)
goto L30;
6575 if (xp <
xmin)
goto L30;
6576 if (xp >
xmax)
break;
6579 if (optionI0 && yp==0)
goto L30;
6631 if (!option0 && !option3) {
6633 if (yi1 < ymin || yi1 >
ymax)
goto L30;
6636 if (!symbolsize || !errormarker) drawmarker =
kFALSE;
6640 if ((yi3 >=
ymax) || (yi4 <=
ymin))
6642 gPad->PaintBox(xi1,yi3,xi2,yi4);
6658 if (optionE && drawmarker) {
6659 if ((yi3 < yi1 - s2y) && (yi3 <
ymax))
6661 if ((yi1 + s2y < yi4) && (yi4 >
ymin))
6665 if (yi1<ymax && yi1>
ymin) {
6666 if (xi1 < xi3 - s2x)
6667 add_segment(xi1,yi1,xi3 - s2x,yi2);
6668 if (xi3 + s2x < xi2)
6669 add_segment(xi3 + s2x,yi1,xi2,yi2);
6673 if (optionE && !drawmarker && (ey1 != 0 || ey2 !=0)) {
6674 if ((yi3 < yi1) && (yi3 <
ymax))
6676 if ((yi1 < yi4) && (yi4 >
ymin))
6680 if (yi1<ymax && yi1>
ymin) {
6682 add_segment(xi1,yi1,xi3,yi2);
6684 add_segment(xi3,yi1,xi2,yi2);
6691 if (option1 && drawmarker) {
6693 if (yi3 < yi1-s2y && yi3 < ymax && yi3 >
ymin)
6694 add_segment(xi3 - bxsize, yi3, xi3 + bxsize, yi3);
6695 if (yi4 > yi1+s2y && yi4 < ymax && yi4 >
ymin)
6696 add_segment(xi3 - bxsize, yi4, xi3 + bxsize, yi4);
6697 if (yi1 <= ymax && yi1 >=
ymin) {
6699 add_segment(xi1, yi1 - bysize, xi1, yi1 + bysize);
6701 add_segment(xi2, yi1 - bysize, xi2, yi1 + bysize);
6708 add_marker(xi3, yi1);
6742 if (if2 > npoints) {
6743 for (i=1; i<if1; i++) {
6744 xline[if1-2+i] = xline[if2-1+i];
6745 yline[if1-2+i] = yline[if2-1+i];
6749 if (option4) graph.
PaintGraph(2*npoints,xline.data(),yline.data(),
"FC");
6750 else graph.
PaintGraph(2*npoints,xline.data(),yline.data(),
"F");
6751 gPad->SetLogx(logx);
6752 gPad->SetLogy(logy);
6762 fH->TAttMarker::Modify();
6763 fH->TAttLine::Modify();
6772 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
6775 Error(
"Paint2DErrors",
"no TView in current pad");
6782 view->
SetView(phideg, thedeg, psideg, irep);
6785 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
6786 fLego->SetFillColor(
gPad->GetFrameFillColor());
6787 fLego->TAttFill::Modify();
6793 fLego->TAttFill::Modify();
6797 fLego->InitMoveScreen(-1.1,1.1);
6834 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
6877 gPad->PaintLine3D(temp1, temp2);
6884 gPad->PaintLine3D(temp1, temp2);
6891 gPad->PaintLine3D(temp1, temp2);
6895 view->
WCtoNDC(temp1, &temp2[0]);
6896 gPad->PaintPolyMarker(1, &temp2[0], &temp2[1]);
6902 fLego->InitMoveScreen(-1.1,1.1);
6904 fLego->FrontBox(90);
6929 if (frame)
gPad->Remove(frame);
6935 if (!
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode())
6956 f2->
Paint(
"surf same");
6958 obj->Paint(
"cont3 same");
6961 }
else if (obj->InheritsFrom(
TF1::Class())) {
6965 gPad->PushSelectableObject(obj);
6969 if (!
gPad->PadInHighlightMode() || (
gPad->PadInHighlightMode() && obj ==
gPad->GetSelected()))
6970 obj->Paint(lnk->GetOption());
6984 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
6987 static char chopth[17];
6989 Int_t htype, oldhtype;
6990 Int_t i, j, first, last, nbins, fixbin;
6994 strlcpy(chopth,
" ",17);
7009 nbins = last - first + 1;
7011 std::vector<Double_t> keepx, keepy;
7014 if (fixbin) keepx.resize(2);
7015 else keepx.resize(nbins+1);
7016 keepy.resize(nbins);
7022 for (j=first; j<=last;j++) {
7032 keepy[j-first] = yb;
7048 if (htype == 0 || htype == 1000) htype = 1001;
7070 if (!fixbin && strlen(chopth)) {
7105 graph.
PaintGrapHist(nbins, keepx.data(), keepy.data() ,chopth);
7144 if (strstr(opt,
"iso")) {
7159 view->
SetView(phideg, thedeg, psideg, irep);
7162 cmd.
Form(
"TPolyMarker3D::PaintH3((TH1 *)0x%zx,\"%s\");",(
size_t)
fH,
option);
7207 while (
auto obj = next()) {
7230 static const char *where =
"PaintInit";
7251 Error(where,
"cannot set X axis to log scale");
7258 TIter next(
gPad->GetListOfPrimitives());
7259 while ((obj = (
TObject *)next())) {
7270 Error(where,
"undefined user's coordinates. Cannot use option SAME");
7274 for (i=first; i<=last; i++) {
7286 Error(where,
"cannot set X axis to log scale");
7310 Int_t nonNullErrors = 0;
7312 for (i=first; i<=last;i++) {
7314 if (std::isnan(
c1) || std::isinf(
c1))
7327 if (e1 > 0) nonNullErrors++;
7344 fval =
f1->
Eval(xv[0],0,0);
7356 if (!nonNullErrors) {
7375 Error(where,
"log scale requested with a negative argument (%f)", xm);
7388 if (!
Hoption.
Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)",
ymax);
7396 }
else if (
ymin < 0) {
7416 if (allchan) factor /= allchan;
7417 if (factor == 0) factor = 1;
7435 Error(where,
"Cannot set Y axis to log scale");
7481 static const char *where =
"PaintInitH";
7506 Error(where,
"cannot set Y axis to log scale");
7528 for (i=first; i<=last;i++) {
7543 fval =
f1->
Eval(xv[0],0,0);
7565 Error(where,
"log scale requested with zero or negative argument (%f)", xm);
7573 if (!
Hoption.
Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)",
xmax);
7581 }
else if (
xmin < 0) {
7595 if (allchan) factor /= allchan;
7596 if (factor == 0) factor = 1;
7607 Error(where,
"Cannot set Y axis to log scale");
7646 Double_t wxyz[8][3] = { {-1,-1,-1}, {1,-1,-1}, {1,1,-1}, {-1,1,-1},
7647 {-1,-1, 1}, {1,-1, 1}, {1,1, 1}, {-1,1, 1} };
7648 Int_t iface[6][4] = { {0,3,2,1}, {4,5,6,7},
7649 {0,1,5,4}, {1,2,6,5}, {2,3,7,6}, {3,0,4,7} };
7663 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
7668 Error(
"PaintH3",
"no TView in current pad");
7675 view->
SetView(phideg, thedeg, psideg, irep);
7681 fLego->InitMoveScreen(-1.1,1.1);
7693 Int_t incrx = (tnorm[ 8] < 0.) ? -1 : +1;
7694 Int_t incry = (tnorm[ 9] < 0.) ? -1 : +1;
7695 Int_t incrz = (tnorm[10] < 0.) ? -1 : +1;
7710 fH->TAttFill::Modify();
7711 fH->TAttLine::Modify();
7720 Double_t pmin[3], pmax[3], sxyz[8][3];
7721 for (
Int_t ix = ix1; ix !=ix2+incrx; ix += incrx) {
7724 for (
Int_t iy = iy1; iy != iy2+incry; iy += incry) {
7727 for (
Int_t iz = iz1; iz != iz2+incrz; iz += incrz) {
7737 if (
w <
wmin)
continue;
7740 if (scale == 0)
continue;
7741 for (
Int_t i=0; i<3; ++i) {
7744 for (
Int_t k=0; k<8; ++k) {
7745 sxyz[k][i] = wxyz[k][i]*
d +
c;
7748 for (
Int_t k=0; k<8; ++k) {
7749 view->
WCtoNDC(&sxyz[k][0],&sxyz[k][0]);
7752 for (
Int_t k=0; k<6; ++k) {
7753 for (
Int_t i=0; i<4; ++i) {
7754 Int_t iv = iface[k][i];
7758 x[4] =
x[0] ;
y[4] =
y[0];
7760 x[5] =
x[2] ;
y[5] =
y[2];
7761 x[6] =
x[3] ;
y[6] =
y[3];
7762 x[7] =
x[1] ;
y[7] =
y[1];
7768 if (z <= 0.)
continue;
7773 if (k == 3 || k == 5) {
7775 }
else if (k == 0 || k == 1) {
7781 fH->TAttFill::Modify();
7782 gPad->PaintFillArea(4,
x,
y);
7783 if (iopt != 3)
gPad->PaintPolyLine(
n,
x,
y);
7812 while (
auto obj = next()) {
7828 fH->TAttFill::Modify();
7838 {-1,-1,-1}, {1,-1,-1}, {1,1,-1}, {-1,1,-1},
7839 {-1,-1, 1}, {1,-1, 1}, {1,1, 1}, {-1,1, 1}
7841 Int_t iface[6][4] = {
7842 {0,3,2,1}, {4,5,6,7},
7843 {0,1,5,4}, {1,2,6,5}, {2,3,7,6}, {3,0,4,7}
7847 {0,-1,0}, {1,0,0}, {0,1,0}, {-1,0,0}
7862 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
7867 Error(
"PaintH3",
"no TView in current pad");
7874 view->
SetView(phideg, thedeg, psideg, irep);
7881 fLego->InitMoveScreen(-1.1,1.1);
7886 fLego->InitRaster(-1.1,-1.1,1.1,1.1,1000,800);
7891 Int_t incrx = (tnorm[ 8] < 0.) ? +1 : -1;
7892 Int_t incry = (tnorm[ 9] < 0.) ? +1 : -1;
7893 Int_t incrz = (tnorm[10] < 0.) ? +1 : -1;
7902 fH->TAttLine::Modify();
7905 const Int_t NTMAX = 100;
7910 Double_t pmin[3], pmax[3], sxyz[8][3], pp[4][2];
7911 for (
Int_t ix = ix1; ix !=ix2+incrx; ix += incrx) {
7914 for (
Int_t iy = iy1; iy != iy2+incry; iy += incry) {
7917 for (
Int_t iz = iz1; iz != iz2+incrz; iz += incrz) {
7926 if (
w <
wmin)
continue;
7929 if (scale == 0)
continue;
7930 for (
Int_t i=0; i<3; ++i) {
7933 for (
Int_t k=0; k<8; ++k) {
7934 sxyz[k][i] = wxyz[k][i]*
d +
c;
7937 for (
Int_t k=0; k<8; ++k) {
7938 view->
WCtoNDC(&sxyz[k][0],&sxyz[k][0]);
7940 for (
Int_t k=0; k<6; ++k) {
7942 view->
FindNormal(normal[k][0], normal[k][1], normal[k][2], zn);
7943 if (zn <= 0)
continue;
7944 for (
Int_t i=0; i<4; ++i) {
7945 Int_t ip = iface[k][i];
7946 pp[i][0] = sxyz[ip][0];
7947 pp[i][1] = sxyz[ip][1];
7949 for (
Int_t i=0; i<4; ++i) {
7951 Int_t i2 = (i == 3) ? 0 : i + 1;
7953 fLego->FindVisibleLine(&pp[i1][0], &pp[i2][0], NTMAX, nt, &
tt[0][0]);
7954 Double_t xdel = pp[i2][0] - pp[i1][0];
7955 Double_t ydel = pp[i2][1] - pp[i1][1];
7957 for (
Int_t it = 0; it < nt; ++it) {
7958 x[0] = pp[i1][0] + xdel*
tt[it][0];
7959 y[0] = pp[i1][1] + ydel*
tt[it][0];
7960 x[1] = pp[i1][0] + xdel*
tt[it][1];
7961 y[1] = pp[i1][1] + ydel*
tt[it][1];
7962 gPad->PaintPolyLine(2,
x,
y);
7969 fLego->FindVisibleLine(&pp[i1][0], &pp[i2][0], NTMAX, nt, &
tt[0][0]);
7970 Double_t xdel = pp[i2][0] - pp[i1][0];
7971 Double_t ydel = pp[i2][1] - pp[i1][1];
7973 for (
Int_t it = 0; it < nt; ++it) {
7974 x[0] = pp[i1][0] + xdel*
tt[it][0];
7975 y[0] = pp[i1][1] + ydel*
tt[it][0];
7976 x[1] = pp[i1][0] + xdel*
tt[it][1];
7977 y[1] = pp[i1][1] + ydel*
tt[it][1];
7978 gPad->PaintPolyLine(2,
x,
y);
7982 fLego->FindVisibleLine(&pp[i1][0], &pp[i2][0], NTMAX, nt, &
tt[0][0]);
7983 xdel = pp[i2][0] - pp[i1][0];
7984 ydel = pp[i2][1] - pp[i1][1];
7985 for (
Int_t it = 0; it < nt; ++it) {
7986 x[0] = pp[i1][0] + xdel*
tt[it][0];
7987 y[0] = pp[i1][1] + ydel*
tt[it][0];
7988 x[1] = pp[i1][0] + xdel*
tt[it][1];
7989 y[1] = pp[i1][1] + ydel*
tt[it][1];
7990 gPad->PaintPolyLine(2,
x,
y);
7993 fLego->FillPolygonBorder(4, &pp[0][0]);
8018 while (
auto obj = next()) {
8049 Int_t ic2 = ic1+nbcol;
8050 Int_t ic3 = ic2+nbcol;
8060 std::vector<Double_t>
x(nx);
8061 std::vector<Double_t>
y(ny);
8062 std::vector<Double_t> z(nz);
8080 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
8084 Error(
"PaintH3Iso",
"no TView in current pad");
8090 view->
SetView(phideg, thedeg, psideg, irep);
8105 for (
Int_t col=0;col<nbcol;col++) {
8111 fLego->InitMoveScreen(-1.1,1.1);
8119 fLego->LightSource(0, ydiff, 0, 0, 0, irep);
8120 fLego->LightSource(1, yligh1, 1, 1, 1, irep);
8121 fLego->SurfaceProperty(qa, qd, qs, 1, irep);
8123 fmax = ydiff*qa + (yligh1+0.1)*(qd+qs);
8124 fLego->SetIsoSurfaceParameters(fmin, fmax, nbcol, ic1, ic2, ic3);
8126 fLego->IsoSurface(1, s, nx, ny, nz,
x.data(),
y.data(), z.data(),
"BF");
8129 fLego->InitMoveScreen(-1.1,1.1);
8131 fLego->FrontBox(90);
8143 while (
auto obj = next()) {
8176 if (deltaz == 0) deltaz = 1;
8223 TH1 * hid =
nullptr;
8224 Color_t colormain = -1, colordark = -1;
8235 drawShadowsInLego1 =
kFALSE;
8261 for (
Int_t id=0;
id<=nids;
id++) {
8264 if (colormain == 1) colormain = 17;
8266 else colordark = colormain;
8267 fLego->SetColorMain(colormain,
id);
8268 fLego->SetColorDark(colordark,
id);
8269 if (
id <= 1)
fLego->SetColorMain(colormain,-1);
8270 if (
id == nids)
fLego->SetColorMain(colormain,99);
8279 Error(
"PaintLego",
"no TView in current pad");
8286 view->
SetView(phideg, thedeg, psideg, irep);
8292 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
8293 fLego->SetFillColor(
gPad->GetFrameFillColor());
8294 fLego->TAttFill::Modify();
8302 fLego->TAttFill::Modify();
8306 if (raster)
fLego->InitRaster(-1.1,-1.1,1.1,1.1,1000,800);
8307 else fLego->InitMoveScreen(-1.1,1.1);
8349 fLego->LegoCartesian(90,nx,ny,
"FB");}
8361 fLego->InitMoveScreen(-1.1,1.1);
8384 Int_t ndivx, ndivy, ndivz, i;
8386 static char chopax[8], chopay[8], chopaz[8];
8387 Int_t ix1, ix2, iy1, iy2, iz1, iz2;
8392 Error(
"PaintLegoAxis",
"no TView in current pad");
8417 view->
AxisVertex(ang, av, ix1, ix2, iy1, iy2, iz1, iz2);
8418 for (i = 1; i <= 8; ++i) {
8419 r[i*3 - 3] = av[i*3 - 3] + av[i*3 - 2]*cosa;
8420 r[i*3 - 2] = av[i*3 - 2]*sina;
8421 r[i*3 - 1] = av[i*3 - 1];
8435 if (!rmin || !rmax)
return;
8438 if (
x1[0] >
x2[0]) strlcpy(chopax,
"SDH=+",8);
8439 else strlcpy(chopax,
"SDH=-",8);
8440 if (
y1[0] >
y2[0]) strlcpy(chopay,
"SDH=+",8);
8441 else strlcpy(chopay,
"SDH=-",8);
8442 if (z2[1] > z1[1]) strlcpy(chopaz,
"SDH=+",8);
8443 else strlcpy(chopaz,
"SDH=-",8);
8457 strlcat(chopax,
"N",8);
8461 strlcat(chopay,
"N",8);
8465 strlcat(chopaz,
"N",8);
8487 strlcat(chopax,
"t",8);
8505 strlcpy(chopay,
"V=+UN",8);
8520 strlcat(chopay,
"t",8);
8543 strlcat(chopaz,
"t",8);
8552 if (ztit.
Index(
";")>0) {
8556 axis->
PaintAxis(z1[0], z1[1], z2[0], z2[1], bmin, bmax, ndivz, chopaz);
8573 delete palette; palette =
nullptr;
8578 delete palette; palette =
nullptr;
8606 fH->TAttMarker::Modify();
8609 Double_t dz, z, xk,xstep, yk, ystep;
8614 if (zmin == 0 && zmax == 0)
return;
8625 if (zmin == 0 && zmax == 0)
return;
8628 if (ncells > 10000) scale /= 5;
8632 if (dz >=
kNMAX || zmax < 1) {
8633 scale = (
kNMAX-1)/dz;
8634 if (ncells > 10000) scale /= 5;
8641 if (zmin >= 0) zmin = 0;
8642 else zmin -= yMARGIN*(zmax-zmin);
8644 Double_t dzmin = yMARGIN*(zmax-zmin);
8645 if (zmin >= 0 && (zmin-dzmin <= 0)) zmin = 0;
8654 strlcpy(optscat,opt.
Data(),100);
8655 char *oscat = strstr(optscat,
"scat=");
8656 char *blank = strstr(oscat,
" ");
if (blank) *blank = 0;
8657 sscanf(oscat+5,
"%lg",&scale);
8671 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
8673 if (z < zmin) z = zmin;
8674 if (z > zmax) z = zmax;
8680 if (z <= 0)
continue;
8684 for (
Int_t loop=0; loop<k; loop++) {
8685 if (k+marker >=
kNMAX) {
8689 fXbuf[marker] = (random.
Rndm()*xstep) + xk;
8690 fYbuf[marker] = (random.
Rndm()*ystep) + yk;
8699 if (
fXbuf[marker] <
gPad->GetUxmin())
break;
8700 if (
fYbuf[marker] <
gPad->GetUymin())
break;
8701 if (
fXbuf[marker] >
gPad->GetUxmax())
break;
8702 if (
fYbuf[marker] >
gPad->GetUymax())
break;
8708 if (marker > 0)
gPad->PaintPolyMarker(marker,
fXbuf.data(),
fYbuf.data());
8760 while (
auto obj = next()) {
8767 if (stats && dostat) {
8773 if (!dofit) fit =
nullptr;
8774 if (dofit == 1) dofit = 111;
8775 if (dostat == 1) dostat = 1111;
8776 Int_t print_name = dostat%10;
8777 Int_t print_entries = (dostat/10)%10;
8778 Int_t print_mean = (dostat/100)%10;
8779 Int_t print_stddev = (dostat/1000)%10;
8780 Int_t print_under = (dostat/10000)%10;
8781 Int_t print_over = (dostat/100000)%10;
8782 Int_t print_integral= (dostat/1000000)%10;
8783 Int_t print_skew = (dostat/10000000)%10;
8784 Int_t print_kurt = (dostat/100000000)%10;
8785 Int_t nlines = print_name + print_entries + print_mean + print_stddev +
8786 print_under + print_over + print_integral +
8787 print_skew + print_kurt;
8788 Int_t print_fval = dofit%10;
8789 Int_t print_ferrors = (dofit/10)%10;
8790 Int_t print_fchi2 = (dofit/100)%10;
8791 Int_t print_fprob = (dofit/1000)%10;
8792 Int_t nlinesf = print_fval + print_fchi2 + print_fprob;
8795 else nlinesf += fit->
GetNpar();
8801 if (!dostat && !fit) {
8840 if (print_entries) {
8846 if (print_mean == 1) {
8856 if (print_mean == 1) {
8868 if (print_stddev == 1) {
8878 if (print_stddev == 1) {
8899 if (print_integral) {
8900 if (print_integral == 1) {
8910 if (print_skew == 1) {
8921 if (print_kurt == 1) {
8937 if (print_fchi2) stats->
AddText(
tt.Data());
8943 if (print_fval || print_ferrors) {
8947 if (print_fval < 2 && parmin*parmax != 0 && parmin >= parmax)
continue;
8948 if (print_ferrors) {
8979 while (
auto obj = next()) {
8985 if (stats && dostat) {
8991 if (dostat == 1) dostat = 1111;
8992 Int_t print_name = dostat%10;
8993 Int_t print_entries = (dostat/10)%10;
8994 Int_t print_mean = (dostat/100)%10;
8995 Int_t print_stddev = (dostat/1000)%10;
8996 Int_t print_under = (dostat/10000)%10;
8997 Int_t print_over = (dostat/100000)%10;
8998 Int_t print_integral= (dostat/1000000)%10;
8999 Int_t print_skew = (dostat/10000000)%10;
9000 Int_t print_kurt = (dostat/100000000)%10;
9001 Int_t nlines = print_name + print_entries + 2*print_mean + 2*print_stddev + print_integral;
9002 if (print_under || print_over) nlines += 3;
9007 if (!dostat && !fit) {
9047 if (print_entries) {
9053 if (print_mean == 1) {
9072 if (print_stddev == 1) {
9090 if (print_integral) {
9096 if (print_skew == 1) {
9115 if (print_kurt == 1) {
9133 if (print_under || print_over) {
9144 unov[0] = h2->
Integral( 0, firstX-1, lastY+1, cellsY );
9145 unov[1] = h2->
Integral(firstX , lastX , lastY+1, cellsY );
9146 unov[2] = h2->
Integral(lastX+1, cellsX , lastY+1, cellsY );
9147 unov[3] = h2->
Integral( 0, firstX-1, firstY , lastY );
9148 unov[4] = h2->
Integral(firstX , lastX , firstY , lastY );
9149 unov[5] = h2->
Integral(lastX+1, cellsX , firstY , lastY );
9150 unov[6] = h2->
Integral( 0, firstX-1, 0, firstY-1);
9151 unov[7] = h2->
Integral(firstX, lastX, 0, firstY-1);
9152 unov[8] = h2->
Integral(lastX+1, cellsX , 0, firstY-1);
9154 tt.Form(
"%g|%g|%g\n", unov[0], unov[1], unov[2]);
9156 tt.Form(
"%g|%g|%g\n", unov[3], unov[4], unov[5]);
9158 tt.Form(
"%g|%g|%g\n", unov[6], unov[7], unov[8]);
9168 tt.Form(
"%-8s = %5.4g #pm %5.4g ",fit->
GetParName(ipar)
9192 while (
auto obj = next()) {
9198 if (stats && dostat) {
9204 if (dostat == 1) dostat = 1111;
9205 Int_t print_name = dostat%10;
9206 Int_t print_entries = (dostat/10)%10;
9207 Int_t print_mean = (dostat/100)%10;
9208 Int_t print_stddev = (dostat/1000)%10;
9209 Int_t print_under = (dostat/10000)%10;
9210 Int_t print_over = (dostat/100000)%10;
9211 Int_t print_integral= (dostat/1000000)%10;
9212 Int_t print_skew = (dostat/10000000)%10;
9213 Int_t print_kurt = (dostat/100000000)%10;
9214 Int_t nlines = print_name + print_entries + 3*print_mean + 3*print_stddev + print_integral;
9215 if (print_under || print_over) nlines += 3;
9220 if (!dostat && !fit) {
9258 if (print_entries) {
9264 if (print_mean == 1) {
9290 if (print_stddev == 1) {
9315 if (print_integral) {
9320 if (print_skew == 1) {
9346 if (print_kurt == 1) {
9371 if (print_under || print_over) {
9382 tt.Form(
"%-8s = %5.4g #pm %5.4g ",fit->
GetParName(ipar)
9419 if (deltaz == 0) deltaz = 1;
9486 Error(
"PaintSurface",
"no TView in current pad");
9493 view->
SetView(phideg, thedeg, psideg, irep);
9497 fLego->SetFillStyle(0);
9498 fLego->SetFillColor(1);
9500 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
9501 fLego->SetFillColor(
gPad->GetFrameFillColor());
9503 fLego->TAttFill::Modify();
9511 fLego->TAttFill::Modify();
9531 if (raster)
fLego->InitRaster(-1.1,-1.1,1.1,1.1,1000,800);
9532 else fLego->InitMoveScreen(-1.1,1.1);
9545 fLego->LightSource(0, ydiff, 0,0,0,irep);
9546 fLego->LightSource(1, yligh1 ,1,1,1,irep);
9547 fLego->SurfaceProperty(qa, qd, qs, 1, irep);
9549 fmax = fmin + (yligh1+0.1)*(qd+qs);
9554 if (!colref)
return;
9559 for (
Int_t col=0;col<nbcol;col++) {
9564 fLego->Spectrum(nbcol, fmin, fmax, icol1, 1, irep);
9606 fLego->InitMoveScreen(-1.1,1.1);
9626 fLego->InitMoveScreen(-1.1,1.1);
9653 if (!dt && !dtOld)
return;
9657 fGraph2DPainter = dt ? std::make_unique<TGraph2DPainter>(dt) : std::make_unique<TGraph2DPainter>(dtOld);
9664 Error(
"PaintTriangles",
"no TView in current pad, do not use option SAME");
9669 if (!rmin || !rmax)
return;
9689 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
9692 Error(
"PaintTriangles",
"no TView in current pad");
9699 view->
SetView(phideg, thedeg, psideg, irep);
9702 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
9703 fLego->SetFillColor(
gPad->GetFrameFillColor());
9704 fLego->TAttFill::Modify();
9710 fLego->TAttFill::Modify();
9714 fLego->InitMoveScreen(-1.1,1.1);
9725 fLego->InitMoveScreen(-1.1,1.1);
9727 fLego->FrontBox(90);
9751 Warning(
"PaintSurface",
"too many color levels, %d >= 100, reset to 99", ndivz);
9754 std::vector<Double_t> funlevel(ndivz+1);
9755 std::vector<Int_t> colorlevel(ndivz+1);
9758 for (i = 0; i < ndivz; ++i) {
9764 fLego->ColorFunction(ndivz, funlevel.data(), colorlevel.data(), irep);
9832 while (
auto obj = next()) {
9840 if (!
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode()) {
9860 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
return;
9877 while ((obj=next())) {
9879 z =
b->GetContent();
9881 poly =
b->GetPolygon();
9886 g->TAttLine::Modify();
9887 g->TAttMarker::Modify();
9888 g->TAttFill::Modify();
9896 g->SetFillStyle(
fs);
9898 if (fill)
g->Paint(
"F");
9899 if (mark)
g->Paint(
"P");
9909 while ((
g = (
TGraph*) nextg())) {
9910 g->TAttLine::Modify();
9911 g->TAttMarker::Modify();
9912 g->TAttFill::Modify();
9920 g->SetFillStyle(
fs);
9922 if (fill)
g->Paint(
"F");
9923 if (mark)
g->Paint(
"P");
9936 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
9939 Int_t ncolors, color, theColor;
9967 while (
auto obj = next()) {
9971 z =
b->GetContent();
9977 if (z < zmin)
continue;
9982 if (z < zc)
continue;
9984 for (
Int_t k=0; k<ndiv; k++) {
9993 color =
Int_t(0.01+(z-zmin)*scale);
9996 if (theColor > ncolors-1) theColor = ncolors-1;
10003 auto origin =
g->GetFillColor();
10004 g->SetFillColor(rootColor);
10005 g->TAttFill::Modify();
10007 g->SetFillColor(origin);
10014 while (
auto g = (
TGraph*) nextg()) {
10015 auto origin =
g->GetFillColor();
10016 g->SetFillColor(rootColor);
10017 g->TAttFill::Modify();
10019 g->SetFillColor(origin);
10033 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
10036 Int_t k, loop, marker=0;
10037 Double_t z, xk,xstep, yk, ystep, xp, yp;
10051 scale = (
kNMAX-1)/dz;
10065 while ((obj=next())) {
10068 if (
a>maxarea) maxarea =
a;
10073 while ((obj=next())) {
10075 poly =
b->GetPolygon();
10076 z =
b->GetContent();
10077 if (z < zmin) z = zmin;
10078 if (z > zmax) z = zmax;
10084 k =
Int_t((z*scale)*(
b->GetArea()/maxarea));
10087 xstep =
b->GetXMax()-xk;
10088 ystep =
b->GetYMax()-yk;
10093 if (k <= 0 || z <= 0)
continue;
10096 if (k+marker >=
kNMAX) {
10100 xp = (random.
Rndm()*xstep) + xk;
10101 yp = (random.
Rndm()*ystep) + yk;
10102 if (
g->IsInside(xp,yp)) {
10103 fXbuf[marker] = xp;
10104 fYbuf[marker] = yp;
10109 if (marker > 0)
gPad->PaintPolyMarker(marker,
fXbuf.data(),
fYbuf.data());
10117 if (k <= 0 || z <= 0)
continue;
10120 if (k+marker >=
kNMAX) {
10124 xp = (random.
Rndm()*xstep) + xk;
10125 yp = (random.
Rndm()*ystep) + yk;
10127 fXbuf[marker] = xp;
10128 fYbuf[marker] = yp;
10133 if (marker > 0)
gPad->PaintPolyMarker(marker,
fXbuf.data(),
fYbuf.data());
10156 text.SetTextAlign(22);
10159 text.TAttText::Modify();
10166 while ((obj=next())) {
10168 p =
b->GetPolygon();
10169 x = (
b->GetXMin()+
b->GetXMax())/2;
10174 y = (
b->GetYMin()+
b->GetYMax())/2;
10179 z =
b->GetContent();
10183 tf.
Form(
"#splitline{%s%s}{#pm %s%s}",
10220 getentries =
kTRUE;
10223 text.SetTextAlign(11);
10224 if (
angle == 90)
text.SetTextAlign(12);
10226 text.TAttText::Modify();
10240 if (yt == 0.)
continue;
10250 if (
y >=
gPad->GetY2())
continue;
10251 if (y <= gPad->GetY1())
continue;
10260 text.SetTextAlign(22);
10263 text.TAttText::Modify();
10282 tf.
Form(
"#splitline{%s%s}{#pm %s%s}",
10315 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
10319 Error(
"PaintTF3",
"no TView in current pad");
10325 view->
SetView(phideg, thedeg, psideg, irep);
10327 fLego->InitMoveScreen(-1.1,1.1);
10332 fLego->BackBox(90);
10342 fLego->InitMoveScreen(-1.1,1.1);
10344 fLego->FrontBox(90);
10381 TIter next(
gPad->GetListOfPrimitives());
10382 while ((obj = next())) {
10385 if (strcmp(title->
GetName(),
"title")) {title =
nullptr;
continue;}
10389 if (title)
delete title;
10404 if (ht <= 0) ht = 0.05;
10425 if (talh < 1) talh = 1;
else if (talh > 3) talh = 3;
10427 if (talv < 1) talv = 1;
else if (talv > 3) talv = 3;
10450 ptitle->
Paint(
"blNDC");
10452 if(!
gPad->IsEditable())
delete ptitle;
10460 if (!strcmp(mess,
"SetF3")) {
10564 for (
int i = 0; i < 100; i++) {
10573 theta -= num / den;
10621 Double_t xmin_aid, ymin_aid, xmax_aid, ymax_aid;
10628 if (
xmin > xmin_aid)
xmin = xmin_aid;
10629 if (
ymin > ymin_aid)
ymin = ymin_aid;
10630 if (
xmax < xmax_aid)
xmax = xmax_aid;
10631 if (
ymax < ymax_aid)
ymax = ymax_aid;
10634 func(
Hparam.
xmin*xscale, 0, xmin_aid, ymin_aid);
10635 func(
Hparam.
xmax*xscale, 0, xmax_aid, ymin_aid);
10636 if (
xmin > xmin_aid)
xmin = xmin_aid;
10637 if (
xmax < xmax_aid)
xmax = xmax_aid;
10642 if (
ymin > ymin_aid)
ymin = ymin_aid;
10643 if (
ymax < ymax_aid)
ymax = ymax_aid;
10660 ymin - dyr*
gPad->GetBottomMargin(),
10661 xmax + dxr*
gPad->GetRightMargin(),
10672 if (
h ==
nullptr)
return;
10686 static const char *where =
"TableInit";
10714 Error(where,
"cannot set X axis to log scale");
10743 Error(where,
"cannot set Y axis to log scale");
10779 if (!
Hoption.
Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)", zmax);
10785 if (zmin >= zmax) {
10787 if (zmax > 0) zmin = 0.001*zmax;
10789 if (!
Hoption.
Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)", zmax);
10799 if (allchan) factor /= allchan;
10800 if (factor == 0) factor = 1;
10802 zmax = factor*zmax;
10803 zmin = factor*zmin;
10829 zmax += yMARGIN*(zmax-zmin);
10837 if (zmin >= 0) zmin = 0;
10838 else zmin -= yMARGIN*(zmax-zmin);
10840 Double_t dzmin = yMARGIN*(zmax-zmin);
10841 if (zmin >= 0 && (zmin-dzmin <= 0)) zmin = 0;
10842 else zmin -= dzmin;
10868 tf.
Form(
"%s%s",
"%",
f);
10872 int ie = tv.
Index(
"e");
10873 int iE = tv.
Index(
"E");
10874 int id = tv.
Index(
".");
10878 if (ie >= 0 || iE >= 0) {
10879 if (tv.
Index(
"+") >= 0) {
10881 ef.
Form(
"%s.1f",
"%");
10884 ef.
Form(
"%s.%de",
"%",ie-
id-1);
10886 ef.
Form(
"%s.%dE",
"%",iE-
id-1);
10891 ef.
Form(
"%s.%de",
"%",ie-
id-1);
10893 ef.
Form(
"%s.%dE",
"%",iE-
id-1);
10898 }
else if (
id < 0) {
10899 ef.
Form(
"%s.1f",
"%");
10918 Int_t projection = 0;
10948 auto c2 =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->FindObject(name2.Data()));
10954 auto c1 =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->FindObject(name1.Data()));
10963 Error(
"SetShowProjection",
"TH3 projections do not work in GL mode");
10968 if (projection == 0)
10976 gROOT->MakeDefCanvas();
10988 auto c2 =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->FindObject(name2.Data()));
10994 auto c1 =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->FindObject(name1.Data()));
10999 if ((nbinsX <= 0) || (nbinsY <= 0))
11003 Error(
"SetShowProjectionXY",
"TH3 projections do not work in GL mode");
11008 if (projection == 0)
11016 gROOT->MakeDefCanvas();
11019 gROOT->MakeDefCanvas();
11044 gPad->PaintBox(uxmin,py1,uxmax,py2,
"iprojX");
11045 gPad->UpdateAsync();
11050 auto c =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->FindObject(name1.Data()));
11058 c->SetLogy(ctxt.
GetSaved()->GetLogz());
11059 c->SetLogx(ctxt.
GetSaved()->GetLogx());
11063 if (
auto hp = ((
TH2*)
fH)->ProjectionX(prjName, biny1, biny2)) {
11064 hp->SetFillColor(38);
11067 if (biny1 == biny2) {
11075 hp->SetTitle(
TString::Format(
"ProjectionX of biny=%d [y=%.*lf..%.*lf]", biny1, valuePrecision, valueFrom, valuePrecision, valueTo));
11087 hp->SetTitle(
TString::Format(
"ProjectionX of biny=[%d,%d] [y=%.*lf..%.*lf]", biny1, biny2, valuePrecision, valueFrom, valuePrecision, valueTo));
11117 gPad->PaintBox(px1, uymin, px2, uymax,
"iprojY");
11118 gPad->UpdateAsync();
11134 c->SetLogy(ctxt.
GetSaved()->GetLogz());
11135 c->SetLogx(ctxt.
GetSaved()->GetLogy());
11139 if (
auto hp = ((
TH2*)
fH)->ProjectionY(prjName, binx1, binx2)) {
11140 hp->SetFillColor(38);
11143 if (binx1 == binx2) {
11151 hp->SetTitle(
TString::Format(
"ProjectionY of binx=%d [x=%.*lf..%.*lf]", binx1, valuePrecision, valueFrom, valuePrecision, valueTo));
11163 hp->SetTitle(
TString::Format(
"ProjectionY of binx=[%d,%d] [x=%.*lf..%.*lf]", binx1, binx2, valuePrecision, valueFrom, valuePrecision, valueTo));
11202 auto &parent = *
gPad;
11205 if (parent.GetGLDevice() != -1)
11208 auto view = parent.GetView();
11213 if ((parent.GetUxmin() == parent.GetUxmax()) || (parent.GetUymin() == parent.GetUymax()))
11217 Double_t rect1x[5] = {0,0,0,0,0}, rect1y[5] = {0,0,0,0,0}, rect2x[5] = {0,0,0,0,0}, rect2y[5] = {0,0,0,0,0};
11221 auto h3 =
dynamic_cast<TH3 *
>(
fH);
11232 static constexpr Int_t iMin = -111;
11233 static constexpr Int_t iMax = -11;
11234 static constexpr Int_t kMaxDist = 50;
11241 auto findAxis = [&parent, px, py, xaxis, yaxis, zaxis, view, getx](
Int_t &besti1,
Int_t &besti2,
char name) {
11243 TAxis *axis1 =
nullptr, *axis2 =
nullptr;
11244 Int_t xindx = 0, yindx = 0, zindx = 0;
11267 for (
Int_t i2 = axis2->GetFirst(); i2 <= axis2->GetLast(); ++i2) {
11269 case 'x': yindx = i1; zindx = i2;
break;
11270 case 'y': xindx = i1; zindx = i2;
break;
11271 default: xindx = i1; yindx = i2;
break;
11273 Double_t v[3] = {getx(xaxis, xindx), getx(yaxis, yindx), getx(zaxis, zindx)};
11275 view->WCtoNDC(
v, ndc);
11276 Int_t px1 = parent.XtoAbsPixel(ndc[0]);
11277 Int_t py1 = parent.YtoAbsPixel(ndc[1]);
11278 Double_t distance =
TMath::Sqrt(1. * (px1 - px) * (px1 - px) + 1. * (py1 - py) * (py1 - py));
11279 if (distance < best_dist) {
11280 best_dist = distance;
11286 return best_dist < kMaxDist;
11289 auto convert = [view, getx, xaxis, yaxis, zaxis](
Int_t ix,
Int_t iy,
Int_t iz,
11291 Double_t vvv[3] = {getx(xaxis, ix), getx(yaxis, iy), getx(zaxis, iz)};
11293 view->WCtoNDC(vvv, uu);
11298 auto draw_rects = [&parent, nbins, kind, &rect1x, &rect2x, &rect1y, &rect2y]() {
11299 rect1x[4] = rect1x[0];
11300 rect1y[4] = rect1y[0];
11301 rect2x[4] = rect2x[0];
11302 rect2y[4] = rect2y[0];
11304 parent.PaintPolyLine(5, rect1x, rect1y,
"iproj3_rect1");
11306 parent.PaintPolyLine(5, rect2x, rect2y,
"iproj3_rect2");
11308 parent.PaintPolyLine(nbins > 1 ? 5 : 2, rect1x, rect1y,
"iproj3_rect1");
11310 parent.PaintPolyLine(5, rect2x, rect2y,
"iproj3_rect2");
11318 parent.UpdateAsync();
11321 Int_t binx = -1, biny = -1, binz = -1, binx2 = -1, biny2 = -1, binz2 = -1, dummy = -1;
11323 auto extend_bin = [nbins](
TAxis *axis,
Int_t &bin) {
11332 auto make_proj = [h3, &binx, &biny, &binz, &binx2, &biny2, &binz2, xaxis, yaxis, zaxis](
const char *proj_kind) {
11345 auto hp = h3->Project3D(proj_kind);
11359 if (!findAxis(biny, binz,
'x'))
11362 biny2 = extend_bin(yaxis, biny);
11363 binz2 = extend_bin(zaxis, binz);
11365 convert(iMin, biny, binz, rect1x[0], rect1y[0]);
11366 convert(iMax, biny, binz, rect1x[1], rect1y[1]);
11367 convert(iMax, biny, binz2, rect1x[2], rect1y[2]);
11368 convert(iMin, biny, binz2, rect1x[3], rect1y[3]);
11369 convert(iMin, biny2, binz, rect2x[0], rect2y[0]);
11370 convert(iMax, biny2, binz, rect2x[1], rect2y[1]);
11371 convert(iMax, biny2, binz2, rect2x[2], rect2y[2]);
11372 convert(iMin, biny2, binz2, rect2x[3], rect2y[3]);
11378 if (
auto hp = make_proj(
"x")) {
11379 hp->SetFillColor(38);
11380 if ((biny == biny2) && (binz == binz2))
11387 hp->SetYTitle(
"Number of Entries");
11394 if (!findAxis(binx, binz,
'y'))
11397 binx2 = extend_bin(xaxis, binx);
11398 binz2 = extend_bin(zaxis, binz);
11400 convert(binx, iMin, binz, rect1x[0], rect1y[0]);
11401 convert(binx, iMax, binz, rect1x[1], rect1y[1]);
11402 convert(binx, iMax, binz2, rect1x[2], rect1y[2]);
11403 convert(binx, iMin, binz2, rect1x[3], rect1y[3]);
11404 convert(binx2, iMin, binz, rect2x[0], rect2y[0]);
11405 convert(binx2, iMax, binz, rect2x[1], rect2y[1]);
11406 convert(binx2, iMax, binz2, rect2x[2], rect2y[2]);
11407 convert(binx2, iMin, binz2, rect2x[3], rect2y[3]);
11412 if (
auto hp = make_proj(
"y")) {
11413 hp->SetFillColor(38);
11414 if ((binx == binx2) && (binz == binz2))
11421 hp->SetYTitle(
"Number of Entries");
11428 if (!findAxis(binx, biny,
'z'))
11430 binx2 = extend_bin(xaxis, binx);
11431 biny2 = extend_bin(yaxis, biny);
11433 convert(binx, biny, iMin, rect1x[0], rect1y[0]);
11434 convert(binx, biny, iMax, rect1x[1], rect1y[1]);
11435 convert(binx, biny2, iMax, rect1x[2], rect1y[2]);
11436 convert(binx, biny2, iMin, rect1x[3], rect1y[3]);
11437 convert(binx2, biny, iMin, rect2x[0], rect2y[0]);
11438 convert(binx2, biny, iMax, rect2x[1], rect2y[1]);
11439 convert(binx2, biny2, iMax, rect2x[2], rect2y[2]);
11440 convert(binx2, biny2, iMin, rect2x[3], rect2y[3]);
11445 if (
auto hp = make_proj(
"z")) {
11446 hp->SetFillColor(38);
11447 if ((binx == binx2) && (biny == biny2))
11454 hp->SetYTitle(
"Number of Entries");
11462 if (!findAxis(dummy, binz,
'x') && !findAxis(dummy, binz,
'y'))
11464 binz2 = extend_bin(zaxis, binz);
11466 convert(iMin, iMax, binz, rect1x[0], rect1y[0]);
11467 convert(iMax, iMax, binz, rect1x[1], rect1y[1]);
11468 convert(iMax, iMin, binz, rect1x[2], rect1y[2]);
11469 convert(iMin, iMin, binz, rect1x[3], rect1y[3]);
11470 if (binz != binz2) {
11471 convert(iMin, iMax, binz2, rect2x[0], rect2y[0]);
11472 convert(iMax, iMax, binz2, rect2x[1], rect2y[1]);
11473 convert(iMax, iMin, binz2, rect2x[2], rect2y[2]);
11474 convert(iMin, iMin, binz2, rect2x[3], rect2y[3]);
11481 if (
auto hp = make_proj(kind == 4 ?
"xy" :
"yx")) {
11482 hp->SetFillColor(38);
11484 hp->SetTitle(
TString::Format(
"Projection%s, binz=%s [z=%.1f..%.1f]", kind == 4 ?
"XY" :
"YX", sbins.
Data(),
11493 hp->SetZTitle(
"Number of Entries");
11501 if (!findAxis(biny, dummy,
'x') && !findAxis(dummy, biny,
'z'))
11504 biny2 = extend_bin(yaxis, biny);
11506 convert(iMin, biny, iMax, rect1x[0], rect1y[0]);
11507 convert(iMax, biny, iMax, rect1x[1], rect1y[1]);
11508 convert(iMax, biny, iMin, rect1x[2], rect1y[2]);
11509 convert(iMin, biny, iMin, rect1x[3], rect1y[3]);
11511 if (biny != biny2) {
11512 convert(iMin, biny2, iMax, rect2x[0], rect2y[0]);
11513 convert(iMax, biny2, iMax, rect2x[1], rect2y[1]);
11514 convert(iMax, biny2, iMin, rect2x[2], rect2y[2]);
11515 convert(iMin, biny2, iMin, rect2x[3], rect2y[3]);
11522 if (
auto hp = make_proj(kind == 6 ?
"xz" :
"zx")) {
11523 hp->SetFillColor(38);
11525 hp->SetTitle(
TString::Format(
"Projection%s, biny=%s [y=%.1f..%.1f]", kind == 6 ?
"XZ" :
"ZX", sbins.
Data(),
11534 hp->SetZTitle(
"Number of Entries");
11542 if (!findAxis(binx, dummy,
'y') && !findAxis(binx, dummy,
'z'))
11545 binx2 = extend_bin(xaxis, binx);
11547 convert(binx, iMax, iMin, rect1x[0], rect1y[0]);
11548 convert(binx, iMax, iMax, rect1x[1], rect1y[1]);
11549 convert(binx, iMin, iMax, rect1x[2], rect1y[2]);
11550 convert(binx, iMin, iMin, rect1x[3], rect1y[3]);
11551 if (binx != binx2) {
11552 convert(binx2, iMax, iMin, rect2x[0], rect2y[0]);
11553 convert(binx2, iMax, iMax, rect2x[1], rect2y[1]);
11554 convert(binx2, iMin, iMax, rect2x[2], rect2y[2]);
11555 convert(binx2, iMin, iMin, rect2x[3], rect2y[3]);
11561 if (
auto hp = make_proj(kind == 8 ?
"yz" :
"zy")) {
11562 hp->SetFillColor(38);
11564 hp->SetTitle(
TString::Format(
"Projection%s of binx=%s [x=%.1f..%.f]", kind == 8 ?
"YZ" :
"ZY", sbins.
Data(),
11573 hp->SetZTitle(
"Number of Entries");
short Style_t
Style number (short)
int Int_t
Signed integer 4 bytes (int)
short Color_t
Color number (short)
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
short Width_t
Line width (short)
float Float_t
Float 4 bytes (float)
short Short_t
Signed Short integer 2 bytes (short)
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void pixel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmin
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char cname
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint angle
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void xpos
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char backcolor
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void ypos
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize fs
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmax
Option_t Option_t TPoint TPoint const char text
Option_t Option_t TPoint TPoint const char y1
R__EXTERN TH1 * gCurrentHist
R__EXTERN Hoption_t Hoption
static TString gStringStdDevZ
static TString gStringStdDevX
static TString gStringIntegralBinWidth
const UInt_t kCannotRotate
static TString gStringStdDev
static TString gStringOverflow
static TString gStringUnderflow
static TString gStringSkewnessY
static TString gStringMean
static TString gStringKurtosis
static TString gStringMeanX
static TString gStringEntries
static TString gStringIntegral
static TString gStringKurtosisY
static TString gStringStdDevY
static TString gStringMeanY
static TString gStringSkewnessX
static TString gStringKurtosisX
static std::unique_ptr< TBox > gXHighlightBox
static std::unique_ptr< TBox > gYHighlightBox
static TString gStringSkewnessZ
static TString gStringMeanZ
static TString gStringSkewness
static TString gStringKurtosisZ
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
Draw all kinds of Arrows.
virtual Int_t GetNdivisions() const
virtual Float_t GetLabelOffset() const
virtual Float_t GetLabelSize() const
virtual Float_t GetTickLength() const
virtual Float_t GetTitleOffset() const
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetImageQuality(EImageQuality lquality)
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
static Style_t GetMarkerStyleBase(Style_t style)
Internal helper function that returns the corresponding marker style with line width 1 for the given ...
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual Font_t GetTextFont() const
Return the text font.
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Class to manage histogram axis.
virtual Bool_t GetTimeDisplay() const
Bool_t IsAlphanumeric() const
const char * GetTitle() const override
Returns title of object.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
const TArrayD * GetXbins() const
const char * GetBinLabel(Int_t bin) const
Return label for bin.
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
virtual Int_t FindFixBin(Double_t x) const
Find bin number corresponding to abscissa x
const char * ChooseTimeFormat(Double_t axislength=0)
Choose a reasonable time format from the coordinates in the active pad and the number of divisions in...
Int_t GetLast() const
Return last bin on the axis i.e.
virtual const char * GetTimeFormatOnly() const
Return only the time format from the string fTimeFormat.
virtual void SetRangeUser(Double_t ufirst, Double_t ulast)
Set the viewing range for the axis from ufirst to ulast (in user coordinates, that is,...
virtual const char * GetTimeFormat() const
virtual void SetRange(Int_t first=0, Int_t last=0)
Set the viewing range for the axis using bin numbers.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Int_t GetFirst() const
Return first bin on the axis i.e.
THashList * GetLabels() const
The candle plot painter class.
void SetLog(int x, int y, int z)
void SetHistoWidth(const Double_t width)
virtual void Paint(Option_t *option="")
Paint one candle with its current attributes.
Bool_t IsViolinScaled() const
Returns true if violin plot should be scaled.
Bool_t IsHorizontal() const
int ParseOption(char *optin)
Parsing of the option-string.
void SetOption(CandleOption opt)
void SetHistogram(TH1D *proj)
Bool_t IsCandleScaled() const
Returns true if candle plot should be scaled.
void SetCandleWidth(const Double_t width)
void SetAxisPosition(const Double_t candlePos)
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
void SetName(const char *name)
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
void Paint(Option_t *option="") override
Paint all objects in this collection.
The color creation and management class.
virtual void SetRGB(Float_t r, Float_t g, Float_t b)
Initialize this color and its "dark" and "bright" associated colors.
static void RGBtoHLS(Float_t r, Float_t g, Float_t b, Float_t &h, Float_t &l, Float_t &s)
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
static Int_t GetColorBright(Int_t color)
Static function: Returns the bright color number corresponding to n If the TColor object does not exi...
static Int_t GetColorDark(Int_t color)
Static function: Returns the dark color number corresponding to n If the TColor object does not exist...
static void HLStoRGB(Float_t h, Float_t l, Float_t s, Float_t &r, Float_t &g, Float_t &b)
void Paint(Option_t *option="") override
Paint this crown with its current attributes.
void SetYXRatio(Double_t v=1)
TDirectory::TContext keeps track and restore the current directory.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual Double_t GetXmax() const
virtual Int_t GetNDF() const
Return the number of degrees of freedom in the fit the fNDF parameter has been previously computed du...
virtual void GetParLimits(Int_t ipar, Double_t &parmin, Double_t &parmax) const
Return limits for parameter ipar.
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
Double_t GetChisquare() const
Return the Chisquare after fitting. See ROOT::Fit::FitResult::Chi2()
virtual void SetMaximum(Double_t maximum=-1111)
Set the maximum value along Y for this function In case the function is already drawn,...
virtual Double_t GetMaximumStored() const
virtual Int_t GetNpar() const
virtual Int_t GetNumberFreeParameters() const
Return the number of free parameters.
virtual void SetMinimum(Double_t minimum=-1111)
Set the minimum value along Y for this function In case the function is already drawn,...
virtual const char * GetParName(Int_t ipar) const
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
virtual Double_t GetXmin() const
virtual Double_t GetParameter(Int_t ipar) const
A 2-Dim function with parameters.
void Paint(Option_t *option="") override
Paint this 2-D function with its current attributes.
void SetRange(Double_t xmin, Double_t xmax) override
Initialize the upper and lower bounds to draw the function.
TF3 defines a 3D Function with Parameters.
void SetTimeFormat(const char *tformat)
Change the format used for time plotting.
virtual void PaintAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t &wmin, Double_t &wmax, Int_t &ndiv, Option_t *chopt="", Double_t gridlength=0, Bool_t drawGridOnly=kFALSE)
Control function to draw an axis.
void SetTitleOffset(Float_t titleoffset=1)
virtual void SetTitle(const char *title="")
Change the title of the axis.
void SetLabelOffset(Float_t labeloffset)
virtual void ImportAxisAttributes(TAxis *axis)
Internal method to import TAxis attributes to this TGaxis.
void SetTickSize(Float_t ticksize)
void SetLabelSize(Float_t labelsize)
void SetOption(Option_t *option="")
To set axis options.
Graphics object made of three arrays X, Y and Z with the same number of points each.
TGraphDelaunay2D generates a Delaunay triangulation of a TGraph2D.
TGraphDelaunay generates a Delaunay triangulation of a TGraph2D.
A TGraph is an object made of two arrays X and Y with npoints each.
@ kClipFrame
Clip to the frame boundary.
void PaintGraph(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
Draw the (x,y) as a graph.
void PaintGrapHist(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
Draw the (x,y) as a histogram.
1-D histogram with a double per channel (see TH1 documentation)
1-D histogram with a float per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
virtual EBinErrorOpt GetBinErrorOption() const
virtual Float_t GetBarWidth() const
virtual Double_t GetMinimumStored() const
virtual Float_t GetBarOffset() const
virtual Double_t GetStdDev(Int_t axis=1) const
Returns the Standard Deviation (Sigma).
virtual Int_t GetNbinsY() const
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
virtual Int_t GetNbinsZ() const
virtual Double_t GetNormFactor() const
virtual Double_t GetMean(Int_t axis=1) const
For axis = 1,2 or 3 returns the mean value of the histogram along X,Y or Z axis.
virtual Double_t GetSkewness(Int_t axis=1) const
virtual Double_t GetContourLevelPad(Int_t level) const
Return the value of contour number "level" in Pad coordinates.
virtual Int_t GetDimension() const
@ kNoTitle
Don't draw the histogram title.
@ kUserContour
User specified contour levels.
@ kNoStats
Don't draw stats box.
virtual Double_t GetSumOfWeights() const
Return the sum of weights across all bins excluding under/overflows.
virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
virtual Int_t GetNbinsX() const
virtual void SetMaximum(Double_t maximum=-1111)
virtual Double_t GetBinErrorLow(Int_t bin) const
Return lower error associated to bin number bin.
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual void SetMinimum(Double_t minimum=-1111)
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
virtual Double_t GetEntries() const
Return the current number of entries.
TList * GetListOfFunctions() const
virtual Double_t GetMeanError(Int_t axis=1) const
Return standard error of mean of this histogram along the X axis.
virtual Double_t GetMaximumStored() const
virtual void GetMinimumAndMaximum(Double_t &min, Double_t &max) const
Retrieve the minimum and maximum values in the histogram.
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
@ kNormal
Errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N)
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual Int_t GetContour(Double_t *levels=nullptr)
Return contour values into array levels if pointer levels is non zero.
const Double_t * GetBuffer() const
virtual Bool_t IsHighlight() const
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
virtual void SetContour(Int_t nlevels, const Double_t *levels=nullptr)
Set the number and values of contour levels.
virtual Double_t GetBinErrorUp(Int_t bin) const
Return upper error associated to bin number bin.
virtual Int_t GetSumw2N() const
virtual Double_t GetStdDevError(Int_t axis=1) const
Return error of standard deviation estimation for Normal distribution.
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
virtual void LabelsDeflate(Option_t *axis="X")
Reduce the number of bins for the axis passed in the option to the number of bins having a label.
virtual Int_t BufferEmpty(Int_t action=0)
Fill histogram with all entries in the buffer.
virtual Double_t GetKurtosis(Int_t axis=1) const
2-D histogram with a double per channel (see TH1 documentation)
2-D histogram with a float per channel (see TH1 documentation)
Helper class to represent a bin in the TH2Poly histogram.
2D Histogram with Polygonal Bins
Service class for 2-D histogram classes.
TH1D * ProjectionY(const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Option_t *option="") const
Project a 2-D histogram into a 1-D histogram along Y (integration along X).
TH1D * ProjectionX(const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Option_t *option="") const
Project a 2-D histogram into a 1-D histogram along X (integration along Y).
Double_t GetBinContent(Int_t binx, Int_t biny) const override
Double_t Integral(Option_t *option="") const override
Return integral of bin contents.
The 3-D histogram classes derived from the 1-D histogram classes.
Double_t Integral(Option_t *option="") const override
Return integral of bin contents.
The Histogram stack class.
The histogram painter class.
static Int_t ProjectSinusoidal2xy(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
Static function code for sinusoidal projection from Ernst-Jan Buis Source https://en....
void Paint(Option_t *option="") override
Control routine to paint any kind of histograms
TAxis * fYaxis
Pointer to Y axis.
std::unique_ptr< TPainter3dAlgorithms > fLego
Pointer to a TPainter3dAlgorithms object.
std::vector< Double_t > fXbuf
X buffer coordinates.
Int_t fXHighlightBin
X highlight bin.
TF3 * fCurrentF3
Current TF3 function.
virtual void PaintErrors(Option_t *option)
Draw 1D histograms error bars.
~THistPainter() override
destructor.
Int_t fShowProjection2
True if a second projection must be drawn (when calling SetShowProjectionXY on a TH2)
virtual void PaintTF3()
Control function to draw a 3D implicit functions.
virtual Int_t TableInit()
Initialize various options to draw 2D histograms.
virtual void PaintTH2PolyScatterPlot(Option_t *option)
Control function to draw a TH2Poly as a scatter plot.
static Int_t ProjectMollweide2xy(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
Static function.
static Int_t ProjectAitoff2xy(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
Static function.
virtual void PaintText(Option_t *option)
Control function to draw a 1D/2D histograms with the bin values.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute the distance from the point px,py to a line.
virtual void PaintAxis(Bool_t drawGridOnly=kFALSE)
Draw axis (2D case) of an histogram.
virtual void PaintColorLevelsFast(Option_t *option)
[Rendering scheme for the COL2 and COLZ2 options] (HP14)
virtual Int_t PaintInit()
Compute histogram parameters used by the drawing routines.
virtual void Paint2DErrors(Option_t *option)
Draw 2D histograms errors.
Int_t fYHighlightBin
Y highlight bin.
virtual void PaintCandlePlot(Option_t *option)
Control function to draw a 2D histogram as a candle (box) plot or violin plot
virtual void PaintScatterPlot(Option_t *option)
Control function to draw a 2D histogram as a scatter plot.
void SetShowProjectionXY(const char *option, Int_t nbinsY, Int_t nbinsX) override
Set projection XY.
virtual void PaintLego(Option_t *option)
Control function to draw a 2D histogram as a lego plot.
virtual void PaintH3(Option_t *option="")
Control function to draw a 3D histograms.
Int_t fNcuts
Number of graphical cuts.
TString fShowOption
Option to draw the projection.
virtual void PaintHighlightBin(Option_t *option="")
Paint highlight bin as TBox object.
virtual void PaintTH2PolyBins(Option_t *option)
Control function to draw a TH2Poly bins' contours.
virtual Int_t PaintContourLine(Double_t elev1, Int_t icont1, Double_t x1, Double_t y1, Double_t elev2, Int_t icont2, Double_t x2, Double_t y2, Double_t *xarr, Double_t *yarr, Int_t *itarr, Double_t *levels)
Fill the matrix xarr and yarr for Contour Plot.
Int_t DetectProjectionKind(Option_t *option)
Return projection kind from option string.
Int_t fShowProjection
True if a projection must be drawn.
virtual void PaintLegoAxis(TGaxis *axis, Double_t ang)
Draw the axis for legos and surface plots.
virtual void PaintTriangles(Option_t *option)
Control function to draw a table using Delaunay triangles.
virtual void HighlightBin(Int_t px, Int_t py)
Check on highlight bin.
virtual void PaintH3Box(Int_t iopt)
Control function to draw a 3D histogram with boxes.
Int_t MakeCuts(char *cutsopt) override
Decode string choptin and fill Graphical cuts structure.
TList * fFunctions
Pointer to histogram list of functions.
void DrawPanel() override
Display a panel with all histogram drawing options.
std::unique_ptr< TPie > fPie
Pointer to a TPie in case of option PIE.
static void PaintSpecialObjects(const TObject *obj, Option_t *option)
Static function to paint special objects like vectors and matrices.
virtual void PaintTitle()
new TGaxis/////////////////// Draw the histogram title
virtual void PaintTH2PolyColorLevels(Option_t *option)
Control function to draw a TH2Poly as a color plot.
virtual std::vector< THistRenderingRegion > ComputeRenderingRegions(TAxis *pAxis, Int_t nPixels, bool isLog)
Returns the rendering regions for an axis to use in the COL2 option.
virtual void ShowProjectionX(Int_t px, Int_t py)
Show projection onto X.
virtual void PaintPalette()
Paint the color palette on the right side of the pad.
TAxis * fXaxis
Pointer to X axis.
virtual void PaintStat2(Int_t dostat, TF1 *fit)
Draw the statistics box for 2D histograms.
virtual void PaintArrows(Option_t *option)
Control function to draw a table as an arrow plot
virtual void RecalculateRange()
Recompute the histogram range following graphics operations.
void PaintStat(Int_t dostat, TF1 *fit) override
Draw the statistics box for 1D and profile histograms.
static Int_t ProjectParabolic2xy(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
Static function code for parabolic projection from Ernst-Jan Buis.
std::unique_ptr< TGraph2DPainter > fGraph2DPainter
Pointer to a TGraph2DPainter object.
virtual void PaintBarH(Option_t *option)
Draw a bar char in a rotated pad (X vertical, Y horizontal)
virtual void PaintStat3(Int_t dostat, TF1 *fit)
Draw the statistics box for 3D histograms.
virtual void PaintSurface(Option_t *option)
Control function to draw a 2D histogram as a surface plot.
TList * fStack
Pointer to stack of histograms (if any)
THistPainter()
Default constructor.
TH1 * fH
Pointer to histogram to paint.
virtual void PaintTH2PolyText(Option_t *option)
Control function to draw a TH2Poly as a text plot.
virtual void ShowProjection3(Int_t px, Int_t py)
Show projection (specified by fShowProjection) of a TH3.
TAxis * fZaxis
Pointer to Z axis.
void SetHistogram(TH1 *h) override
Set current histogram to h
virtual void PaintFunction(Option_t *option)
[Paint functions associated to an histogram.](HP28")
virtual void PaintBar(Option_t *option)
Draw a bar-chart in a normal pad.
static Int_t ProjectMercator2xy(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
Static function.
virtual void PaintBoxes(Option_t *option)
Control function to draw a 2D histogram as a box plot
virtual Int_t MakeChopt(Option_t *option)
Decode string choptin and fill Hoption structure.
char * GetObjectInfo(Int_t px, Int_t py) const override
Display the histogram info (bin number, contents, integral up to bin corresponding to cursor position...
TList * GetContourList(Double_t contour) const override
Get a contour (as a list of TGraphs) using the Delaunay triangulation.
void ProcessMessage(const char *mess, const TObject *obj) override
Process message mess.
void SetShowProjection(const char *option, Int_t nbins) override
Set projection.
virtual void ShowProjectionY(Int_t px, Int_t py)
Show projection onto Y.
static const char * GetBestFormat(Double_t v, Double_t e, const char *f)
This function returns the best format to print the error value (e) knowing the parameter value (v) an...
virtual void PaintContour(Option_t *option)
Control function to draw a 2D histogram as a contour plot.
TCutG * fCuts[kMaxCuts]
Pointers to graphical cuts.
virtual void PaintTable(Option_t *option)
Control function to draw 2D/3D histograms (tables).
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute the actions corresponding to event.
virtual Int_t PaintInitH()
Compute histogram parameters used by the drawing routines for a rotated pad.
virtual void PaintFrame()
Calculate range and clear pad (canvas).
Int_t fCutsOpt[kMaxCuts]
Sign of each cut.
virtual void PaintH3Iso()
Control function to draw a 3D histogram with Iso Surfaces.
std::vector< Double_t > fYbuf
Y buffer coordinates.
virtual void PaintH3BoxRaster()
Control function to draw a 3D histogram with boxes.
virtual void PaintHist(Option_t *option)
Control routine to draw 1D histograms
void SetHighlight() override
Set highlight (enable/disable) mode for fH.
virtual void DefineColorLevels(Int_t ndivz)
Define the color levels used to paint legos, surfaces etc..
virtual void PaintColorLevels(Option_t *option)
Control function to draw a 2D histogram as a color plot.
Bool_t IsInside(Int_t x, Int_t y) override
Return kTRUE if the cell ix, iy is inside one of the graphical cuts.
A class to define a conversion from pixel values to pixel color.
static TImagePalette * CreateCOLPalette(Int_t nContours)
Factory method to creates an image palette for histogram plotting.
An abstract interface to image processing library.
static TImage * Create()
Create an image.
virtual void SetImage(const Double_t *, UInt_t, UInt_t, TImagePalette *=nullptr)
To draw Mathematical Formula.
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
virtual TObjLink * FirstLink() const
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
void AddFirst(TObject *obj) override
Add object at the beginning of the list.
A TMultiGraph is a collection of TGraph (or derived) objects.
TList * GetListOfGraphs() const
virtual Int_t IsInside(Double_t x, Double_t y) const
Return 1 if the point (x,y) is inside one of the graphs 0 otherwise.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
TObject * At(Int_t idx) const override
TObject * FindObject(const char *name) const override
Find an object in this collection using its name.
void Add(TObject *obj) override
TObject * GetObject() const
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
virtual void Delete(Option_t *option="")
Delete this object.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual const char * GetTitle() const
Returns title of object.
virtual TClass * IsA() const
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
@ kCannotPick
if object in a pad cannot be picked
@ kCanDelete
if object in a list can be deleted
@ kMustCleanup
if object destructor must call RecursiveRemove()
void DrawFaceMove3(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 3rd variant for "MOVING SCREEN" algorithm (draw level lines only)
void DrawLevelLines(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw level lines without hidden line removal.
void SurfaceFunction(Int_t ia, Int_t ib, Double_t *f, Double_t *t)
Service function for Surfaces.
void DrawFaceMode1(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *t)
Draw face - 1st variant (2 colors: 1st for external surface, 2nd for internal)
void GouraudFunction(Int_t ia, Int_t ib, Double_t *f, Double_t *t)
Find part of surface with luminosity in the corners.
void DrawFaceMove1(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 1st variant for "MOVING SCREEN" algorithm (draw face with level lines)
void DrawFaceRaster2(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 2nd variant for "RASTER SCREEN" algorithm (draw face for stacked lego plot)
void LegoFunction(Int_t ia, Int_t ib, Int_t &nv, Double_t *ab, Double_t *vv, Double_t *t)
Service function for Legos.
void DrawFaceMove2(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 2nd variant for "MOVING SCREEN" algorithm (draw face for stacked lego plot)
void DrawFaceRaster1(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 1st variant for "RASTER SCREEN" algorithm (draw face with level lines)
void DrawFaceMode3(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *t)
Draw face - 3rd option (draw face for stacked lego plot)
void DrawFaceMode2(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *t)
Draw face - 2nd option (fill in correspondence with function levels)
The palette painting class.
void Paint(Option_t *option="") override
Paint the palette.
void SetHistogram(TH1 *h)
The histogram statistics painter class.
Int_t GetOptStat() const
Return the stat option.
virtual void SetStatFormat(const char *format="6.4g")
Change (i.e. set) the format for printing statistics.
void SetOptStat(Int_t stat=1)
Set the stat option.
virtual const char * GetFitFormat() const
virtual void SetFitFormat(const char *format="5.4g")
Change (i.e. set) the format for printing fit parameters in statistics box.
Int_t GetOptFit() const
Return the fit option.
void SetParent(TObject *obj) override
void SetOptFit(Int_t fit=1)
Set the fit option.
virtual const char * GetStatFormat() const
void Paint(Option_t *option="") override
Paint the pave stat.
A Pave (see TPave) with text, lines or/and boxes inside.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
void Clear(Option_t *option="") override
Clear all lines in this pavetext.
void Draw(Option_t *option="") override
Draw this pavetext with its current attributes.
void Paint(Option_t *option="") override
Paint this pavetext with its current attributes.
virtual TText * GetLine(Int_t number) const
Get Pointer to line number in this pavetext.
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name="")
virtual void SetBorderSize(Int_t bordersize=4)
Sets the border size of the TPave box and shadow.
Option_t * GetOption() const override
Double_t GetX1NDC() const
virtual void SetX2NDC(Double_t x2)
Profile2D histograms are used to display the mean value of Z and its error for each cell in X,...
virtual Double_t GetBinEntries(Int_t bin) const
Return bin entries of a Profile2D histogram.
virtual Double_t GetBinEntries(Int_t bin) const
Return bin entries of a Profile histogram.
Random number generator class based on the maximally equidistributed combined Tausworthe generator by...
Double_t Rndm() override
TausWorth generator from L'Ecuyer, uses as seed 3x32bits integers Use a mask of 0xffffffffUL to make ...
Sequenceable collection abstract base class.
void ToLower()
Change string to lower-case.
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Color_t GetStatTextColor() const
Float_t GetTitleX() const
Int_t GetOptTitle() const
Float_t GetStatFontSize() const
Float_t GetBarOffset() const
Float_t GetTitleSize(Option_t *axis="X") const
Return title size.
Float_t GetTitleY() const
Style_t GetTitleFont(Option_t *axis="X") const
Return title font.
Bool_t GetHistMinimumZero() const
Color_t GetTitleFillColor() const
Style_t GetTitleStyle() const
Color_t GetStatColor() const
Float_t GetBarWidth() const
void SetDrawBorder(Int_t drawborder=1)
Width_t GetTitleBorderSize() const
Int_t GetColorPalette(Int_t i) const
Return color number i in current palette.
Float_t GetErrorX() const
Double_t GetHistTopMargin() const
void SetBarOffset(Float_t baroff=0.5)
Float_t GetEndErrorSize() const
Int_t GetDrawBorder() const
Width_t GetStatBorderSize() const
Color_t GetTitleTextColor() const
void SetBarWidth(Float_t barwidth=0.5)
Float_t GetTitleH() const
Style_t GetStatStyle() const
const char * GetFitFormat() const
const char * GetStatFormat() const
Int_t GetNumberOfColors() const
Return number of colors in the color palette.
Int_t GetNumberContours() const
const char * GetPaintTextFormat() const
Style_t GetStatFont() const
Float_t GetTitleFontSize() const
Int_t GetTitleAlign() const
Float_t GetTitleW() const
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
Base class for several text objects.
virtual Double_t GetPsi()=0
virtual Double_t * GetRmax()=0
virtual void SetAxisNDC(const Double_t *x1, const Double_t *x2, const Double_t *y1, const Double_t *y2, const Double_t *z1, const Double_t *z2)=0
virtual Double_t * GetRmin()=0
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
virtual void SetOutlineToCube()=0
virtual Int_t GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t &ratio)=0
virtual Double_t * GetTnorm()=0
virtual void ExecuteRotateView(Int_t event, Int_t px, Int_t py)=0
virtual TSeqCollection * GetOutline()=0
virtual void PadRange(Int_t rback)=0
virtual void SetRange(const Double_t *min, const Double_t *max)=0
virtual void FindNormal(Double_t x, Double_t y, Double_t z, Double_t &zn)=0
virtual void AxisVertex(Double_t ang, Double_t *av, Int_t &ix1, Int_t &ix2, Int_t &iy1, Int_t &iy2, Int_t &iz1, Int_t &iz2)=0
virtual void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep)=0
Abstract base class used by ROOT graphics editor.
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
small helper class to store/restore gPad context in TPad methods
Helper class to store interactive parameters for individual objects Should be used via MakeInteractiv...
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual Double_t PadtoX(Double_t x) const =0
virtual void UpdateAsync()=0
virtual Double_t AbsPixeltoX(Double_t px)=0
virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")=0
virtual Double_t PadtoY(Double_t y) const =0
virtual void Close(Option_t *option="")=0
virtual Double_t AbsPixeltoY(Double_t py)=0
virtual Bool_t OpaqueMoving() const =0
TZoomInteractive(TVirtualPad &parent, Int_t px, Int_t py)
void ChangeRange(TAxis *xaxis, TAxis *yaxis)
void MovePoint(TVirtualPad &parent, Int_t px, Int_t py)
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Prob(Double_t chi2, Int_t ndf)
Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf...
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
constexpr Double_t PiOver2()
Double_t Log(Double_t x)
Returns the natural logarithm of x.
constexpr Double_t DegToRad()
Conversion from degree to radian: .
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Bool_t AreEqualRel(Double_t af, Double_t bf, Double_t relPrec)
Comparing floating points.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.
Long64_t BinarySearch(Long64_t n, const T *array, T value)
Binary search in an array of n values to locate value.
constexpr Double_t RadToDeg()
Conversion from radian to degree: .
Double_t Log10(Double_t x)
Returns the common (base-10) logarithm of x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Histograms' drawing options structure.
int Curve
"C" A smooth Curve is drawn.
int Proj
"AITOFF", "MERCATOR", "SINUSOIDAL" and "PARABOLIC" projections for 2d plots.
int Axis
"A" Axis are not drawn around the graph.
int Box
"BOX" Draw 2D plot with proportional Boxes.
int Scat
"SCAT" Draw 2D plot a Scatter plot.
int Text
"TEXT" Draw 2D plot with the content of each cell.
int Color
"COL" Draw 2D plot with Colored boxes.
int AxisPos
"X+" and "Y+" Axis position
int List
"LIST" Generate the TObjArray "contours". To be used with option "CONT"
int Logx
log scale in X. Also set by histogram option
int Zscale
"Z" Display the color palette.
int MinimumZero
"MIN0" or gStyle->GetHistMinimumZero()
int Contour
"CONTn" Draw 2D plot as a Contour plot (0 <= n <= 5).
int Off
"][" The first and last vertical lines are not drawn.
int Func
"FUNC" Draw only the function (for example in case of fit).
long Candle
"CANDLE" and "VIOLIN" Draw a 2D histogram as candle/box plot or violin plot.
int Spec
"SPEC" TSpectrum graphics
int FrontBox
"FB" Suppress the front box for the 3D plots.
int Pie
"PIE" Draw 1D plot as a pie chart.
int Star
"*" With option "P", a * is plotted at each point.
int Zero
"0" if selected with any LEGO option the empty bins are not drawn.
int Logz
log scale in Z. Also set by histogram option
int Tri
"TRI" Draw TGraph2D with Delaunay triangles.
int BackBox
"BB" Suppress the back box for the 3D plots.
int Mark
"P" The current Marker is drawn at each point.
int Arrow
"ARR" Draw 2D plot with Arrows.
int Line
"L" A simple polyline through every point is drawn.
int Same
"SAME" Histogram is plotted in the current pad.
int Lego
"LEGO" and "LEGOn" Draw as a Lego plot(1 <= n <= 4).
int Bar
"B", "BAR" and "HBAR" A Bar chart is drawn at each point.
int Polar
"POL" Draw 2D plot with Polar coordinates.
int Fill
"F" A fill area is drawn ("CF" draw a smooth fill area).
int Hist
"HIST" Draw only the histogram.
int Surf
"SURF" and "SURFn" Draw as a Surface ((1 <= n <= 4).
int Logy
log scale in Y. Also set by histogram option
int System
"POL", "CYL", "SPH" and "PSR" Type of coordinate system for 3D plots.
int Error
"En" Draw Errors with current marker type and size (0 <= n <=6).
Histogram parameters structure.
Double_t baroffset
Offset of bin for bars or legos [0,1].
Double_t ylowedge
Low edge of axis.
Double_t xmin
Minimum value along X.
Int_t ylast
Last bin number along Y.
Int_t xfirst
First bin number along X.
Double_t zmin
Minimum value along Z.
Double_t xbinsize
Bin size in case of equidistant bins.
Double_t ymin
Minimum value along y.
Double_t allchan
Integrated sum of contents.
Double_t xlowedge
Low edge of axis.
Double_t ymax
Maximum value along y.
Double_t factor
Multiplication factor (normalization)
Int_t xlast
Last bin number along X.
Double_t ybinsize
Bin size in case of equidistant bins.
Double_t barwidth
Width of bin for bars and legos [0,1].
Double_t zmax
Maximum value along Z.
Double_t xmax
Maximum value along X.
Int_t yfirst
First bin number along Y.