3260 const Int_t big = 9999;
3261 const Int_t kMaxDiff = 7;
3264 return fPie->DistancetoPrimitive(px, py);
3273 Int_t curdist = big;
3274 Int_t yxaxis, dyaxis,xyaxis, dxaxis;
3277 if (!PadPointer)
return 0;
3291 if (d3 <= kMaxDiff) {
gPad->SetSelected(
fZaxis);
return 0;}
3293 if (d1 <= kMaxDiff) {
gPad->SetSelected(
fXaxis);
return 0;}
3295 if (d2 <= kMaxDiff) {
gPad->SetSelected(
fYaxis);
return 0;}
3296 if ( px > puxmin && px < puxmax && py > puymax && py < puymin) curdist = 1;
3307 if (px <= xyaxis+dyaxis && px >= xyaxis && py >puymax && py < puymin) {
3316 if (px >= xyaxis-dyaxis && px <= xyaxis && py >puymax && py < puymin) {
3328 if (py >= yxaxis-dxaxis && py <= yxaxis && px <puxmax && px > puxmin) {
3337 if (yxaxis < puymin) yxaxis = puymin;
3338 if (py <= yxaxis+dxaxis && py >= yxaxis && px <puxmax && px > puxmin) {
3348 if ((px > puxmin) && (py < puymin) && (px < puxmax) && (py > puymax))
3364 Int_t bin =
th2->FindBin(pxu, pyu);
3365 if (bin>0) curdist = 1;
3371 if ( px > puxmin + delta2
3372 && px < puxmax - delta2
3373 && py > puymax + delta2
3374 && py < puymin - delta2) {curdist =1;
goto FUNCTIONS;}
3378 if (
gPad->IsVertical()) {
3383 if (binval == 0 && pybin < puymin) pybin = 10000;
3389 for (
Int_t ibin=bin+1; ibin<binsup; ibin++) {
3391 if (binvalmin>binvaltmp) binvalmin=binvaltmp;
3392 if (binvalmax<binvaltmp) binvalmax=binvaltmp;
3394 Int_t pybinmin =
gPad->YtoAbsPixel(
gPad->YtoPad(binvalmax));
3395 Int_t pybinmax =
gPad->YtoAbsPixel(
gPad->YtoPad(binvalmin));
3396 if (py<pybinmax+kMaxDiff/2 && py>pybinmin-kMaxDiff/2) pybin = py;
3398 if (bin != binsup) {
3400 Int_t pybinsub =
gPad->YtoAbsPixel(
gPad->YtoPad(binsupval));
3401 if (py <=
TMath::Max(pybinsub,pybin) && py >=
TMath::Min(pybinsub,pybin) && pybin != 10000)
return 0;
3411 if (binval == 0 && pxbin > puxmin) pxbin = 10000;
3417 for (
Int_t ibin=bin+1; ibin<binsup; ibin++) {
3419 if (binvalmin>binvaltmp) binvalmin=binvaltmp;
3420 if (binvalmax<binvaltmp) binvalmax=binvaltmp;
3422 Int_t pxbinmin =
gPad->XtoAbsPixel(
gPad->XtoPad(binvalmax));
3423 Int_t pxbinmax =
gPad->XtoAbsPixel(
gPad->XtoPad(binvalmin));
3424 if (px<pxbinmax+kMaxDiff/2 && px>pxbinmin-kMaxDiff/2) pxbin = px;
3434 if (
f->InheritsFrom(
TF1::Class())) dist =
f->DistancetoPrimitive(-px,py);
3435 else dist =
f->DistancetoPrimitive(px,py);
3436 if (dist < kMaxDiff) {
gPad->SetSelected(
f);
return dist;}
3449 Error(
"DrawPanel",
"need to draw histogram first");
3454 gROOT->ProcessLine(
TString::Format(
"((TCanvas*)0x%zx)->Selected((TVirtualPad*)0x%zx,(TObject*)0x%zx,1)",
3469 static Int_t bin, px1, py1, px2, py2, pyold;
3470 static std::unique_ptr<TBox> zoombox;
3474 Double_t xlow, xup, ylow, binval,
x, baroffset, barwidth, binwidth;
3477 if (!
gPad->IsEditable())
return;
3498 if (IsSame.
Index(
"same")>=0) {
3500 TIter next(
gPad->GetListOfPrimitives());
3501 while ((
h1 = (
TH1 *)next())) {
3518 if (!opaque)
gVirtualX->SetLineColor(-1);
3519 fH->TAttLine::Modify();
3521 if (opaque && dimension ==2) {
3522 zbx1 =
gPad->AbsPixeltoX(px);
3523 zbx2 =
gPad->AbsPixeltoX(px);
3524 zby1 =
gPad->AbsPixeltoY(py);
3525 zby2 =
gPad->AbsPixeltoY(py);
3528 if (
gPad->GetLogx()) {
3532 if (
gPad->GetLogy()) {
3536 if (zoombox)
Error(
"ExecuteEvent",
"Last zoom box was not deleted");
3537 zoombox = std::make_unique<TBox>(zbx1, zby1, zbx2, zby2);
3542 zoombox->SetFillColor(ci);
3554 if (dimension ==1) {
3562 x =
gPad->AbsPixeltoX(px);
3566 xup =
gPad->XtoPad(xlow + barwidth*binwidth);
3567 ylow =
gPad->GetUymin();
3568 px1 =
gPad->XtoAbsPixel(xlow);
3569 px2 =
gPad->XtoAbsPixel(xup);
3570 py1 =
gPad->YtoAbsPixel(ylow);
3580 if (dimension ==1) {
3581 if (
gROOT->GetEditHistograms()) {
3590 binval =
gPad->PadtoY(
gPad->AbsPixeltoY(py2))/factor;
3597 if (opaque && dimension ==2) {
3599 zbx2 =
gPad->AbsPixeltoX(px);
3600 zby2 =
gPad->AbsPixeltoY(py);
3604 zoombox->SetX2(zbx2);
3605 zoombox->SetY2(zby2);
3616 if (dimension ==2) {
3621 if (bin2>bin1) xaxis->
SetRange(bin1,bin2);
3626 if (bin2>bin1) yaxis->
SetRange(bin1,bin2);
3635 if (dimension == 2) {
3640 if (bin2>bin1) xaxis->
SetRange(bin1,bin2);
3645 if (bin2>bin1) yaxis->
SetRange(bin1,bin2);
3653 if (dimension ==1) {
3654 if (
gROOT->GetEditHistograms()) {
3655 binval =
gPad->PadtoY(
gPad->AbsPixeltoY(py2))/factor;
3663 if (opaque && dimension ==2) {
3681 if (opaque)
gVirtualX->SetLineColor(-1);
3691 event =
gVirtualX->RequestLocator(1, 1, px, py);
3715 if (!dt && !dtOld)
return nullptr;
3720 ((
THistPainter*)
this)->fGraph2DPainter = dt ? std::make_unique<TGraph2DPainter>(dt) : std::make_unique<TGraph2DPainter>(dtOld);
3732 if (!
gPad)
return (
char*)
"";
3742 if (
gPad->GetView() || drawOption.
Index(
"cont") >= 0) {
3743 uxmin=
gPad->GetUxmin();
3744 uxmax=
gPad->GetUxmax();
3748 uymin=
gPad->GetUymin();
3749 uymax=
gPad->GetUymax();
3755 Int_t binx,biny,binmin=0,binx1;
3756 if (
gPad->IsVertical()) {
3758 if (drawOption.
Index(
"same") >= 0) {
3760 TIter next(
gPad->GetListOfPrimitives());
3761 while ((
h1 = (
TH1 *)next())) {
3774 for (
Int_t ibin=binx+1; ibin<binx1; ibin++) {
3786 if (drawOption.
Index(
"same") >= 0) {
3788 TIter next(
gPad->GetListOfPrimitives());
3789 while ((
h1 = (
TH1 *)next())) {
3802 for (
Int_t ibin=binx+1; ibin<binx1; ibin++) {
3828 biny =
th2->FindBin(
x,
y);
3830 th2->GetBinTitle(biny),
x,
y,biny,
th2->GetBinContent(biny));
3836 fObjectInfo.
Form(
"(x=%g, y=%g, binx=%d, biny=%d, binc=%g, bine=%g, binn=%d)",
3892 if (!changedBin)
return;
3918 if (
gPad->GetLogx()) {
3922 if (
gPad->GetLogy()) {
3929 if (
gPad->IsVertical()) {
3931 if ((hcenter < uxmin) || (hcenter > uxmax))
return;
3934 if ((hcenter < uymin) || (hcenter > uymax))
return;
3938 if ((hcenter < uymin) || (hcenter > uymax))
return;
3943 if (
gPad->IsVertical()) {
4033 Int_t nch = strlen(choptin);
4034 strlcpy(chopt,choptin,128);
4061 for (
Int_t i=0;i<nch;i++) chopt[i] = toupper(chopt[i]);
4067 char *l1 = strstr(chopt,
"PFC");
4068 char *l2 = strstr(chopt,
"PLC");
4069 char *l3 = strstr(chopt,
"PMC");
4070 if (l1 || l2 || l3) {
4078 l = strstr(chopt,
"MIN0");
4084 l = strstr(chopt,
"SPEC");
4089 l = strstr(chopt,
"BF(");
4091 if (sscanf(&
l[3],
"%d",&bs) > 0) {
4104 l = strstr(chopt,
"GL");
4108 l = strstr(chopt,
"X+");
4113 l = strstr(chopt,
"Y+");
4121 l = strstr(chopt,
"SAMES");
4128 l = strstr(chopt,
"SAME");
4136 l = strstr(chopt,
"SCAT");
4138 Warning(
"MakeChopt",
"option SCAT is deprecated.");
4144 l = strstr(chopt,
"PIE");
4151 l = strstr(chopt,
"CANDLE");
4158 l = strstr(chopt,
"VIOLIN");
4165 l = strstr(chopt,
"LEGO");
4176 l = strstr(chopt,
"0");
if (
l) {
Hoption.
Zero = 1; memcpy(
l,
" ",1); }
4179 l = strstr(chopt,
"SURF");
4194 l = strstr(chopt,
"TF3");
4201 l = strstr(chopt,
"ISO");
4209 l = strstr(chopt,
"LIST");
if (
l) {
Hoption.
List = 1; memcpy(
l,
" ",4);}
4211 l = strstr(chopt,
"CONT");
4226 l = strstr(chopt,
"HBAR");
4235 l = strstr(chopt,
"BAR");
4245 l = strstr(chopt,
"ARR" );
4251 l = strstr(chopt,
"COL");
if (
l) {
Hoption.
Arrow = 2; memcpy(
l,
" ",3); }
4257 l = strstr(chopt,
"BOX" );
4270 l = strstr(chopt,
"TEXT");
4273 if (sscanf(&
l[4],
"%d",&
angle) > 0) {
4281 l = strstr(chopt,
"N");
4285 l = strstr(chopt,
"COLZ");
4289 explicitColor =
kTRUE;
4293 l = strstr(chopt,
"0");
if (
l) {
Hoption.
Zero = 1; memcpy(
l,
" ",1); }
4299 l = strstr(chopt,
"COL" );
4303 explicitColor =
kTRUE;
4306 l = strstr(chopt,
"0");
if (
l) {
Hoption.
Zero = 1; memcpy(
l,
" ",1); }
4314 l = strstr(chopt,
"AXIS");
if (
l) {
Hoption.
Axis = 1; memcpy(
l,
" ",4); }
4315 l = strstr(chopt,
"AXIG");
if (
l) {
Hoption.
Axis = 2; memcpy(
l,
" ",4); }
4316 l = strstr(chopt,
"SCAT");
if (
l) {
Hoption.
Scat = 1; memcpy(
l,
" ",4); }
4322 l = strstr(chopt,
"TRI");
4328 l = strstr(chopt,
"ERR");
if (
l) memcpy(
l,
" ",3);
4331 l = strstr(chopt,
"AITOFF");
4335 l = strstr(chopt,
"MERCATOR");
4339 l = strstr(chopt,
"SINUSOIDAL");
4343 l = strstr(chopt,
"PARABOLIC");
4347 l = strstr(chopt,
"MOLLWEIDE");
4373 if (strstr(chopt,
"E")) {
4383 if (strstr(chopt,
"X0")) {
4406 Warning(
"MakeChopt",
"option SURF5 is not supported in Cartesian and Polar modes");
4427 char *left = (
char*)strchr(choptin,
'[');
4428 if (!left)
return 0;
4429 char *right = (
char*)strchr(choptin,
']');
4430 if (!right)
return 0;
4431 Int_t nch = right-left;
4432 if (nch < 2)
return 0;
4433 char *cuts = left+1;
4435 char *comma, *minus;
4438 comma = strchr(cuts,
',');
4439 if (comma) *comma = 0;
4440 minus = strchr(cuts,
'-');
4441 if (minus) cuts = minus+1;
4442 while (*cuts ==
' ') cuts++;
4443 Int_t nc = strlen(cuts);
4444 while (cuts[nc-1] ==
' ') {cuts[nc-1] = 0; nc--;}
4448 while ((obj = next())) {
4450 if (strcmp(obj->
GetName(),cuts))
continue;
4463 for (i=0;i<=nch;i++) left[i] =
' ';
4491 gROOT->ProcessLineFast(
TString::Format(
"TSpectrum2Painter::PaintSpectrum((TH2F*)0x%zx,\"%s\",%d)",
4504 fPie = std::make_unique<TPie>(
fH);
4507 Error(
"Paint",
"Option PIE is for 1D histograms only");
4541 Int_t logysav=0, logzsav=0;
4578 gPad->RangeAxisChanged();
4596 if (gridx)
gPad->SetGridx(0);
4597 if (gridy)
gPad->SetGridy(0);
4599 if (gridx)
gPad->SetGridx(1);
4600 if (gridy)
gPad->SetGridy(1);
4635 if (gridx)
gPad->SetGridx(0);
4636 if (gridy)
gPad->SetGridy(0);
4638 if (gridx)
gPad->SetGridx(1);
4639 if (gridy)
gPad->SetGridy(1);
4648 while ((obj = next())) {
4656 if (!
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode())
4683 arrow->SetAngle(30);
4684 arrow->SetFillStyle(1001);
4690 Int_t ncolors=0, ndivz=0;
4704 for (
Int_t id=1;
id<=2;
id++) {
4711 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
4729 }
else if (
id == 2) {
4741 if (theColor > ncolors-1) theColor = ncolors-1;
4771 if (drawGridOnly && (
gPad->PadInHighlightMode() ||
gPad->PadInSelectionMode()))
4779 TAxis *xaxis =
nullptr;
4780 TAxis *yaxis =
nullptr;
4783 TIter next(
gPad->GetListOfPrimitives());
4786 while ((obj = next())) {
4792 if (strstr(opt,
"hbar")) {
4796 if (!strcmp(xaxis->
GetName(),
"xaxis")) {
4806 static char chopt[10] =
"";
4808 Int_t ndiv, ndivx, ndivy, nx1, nx2, ndivsave;
4809 Int_t useHparam = 0;
4810 Double_t umin, umax, uminsave, umaxsave;
4826 TIter next(
gPad->GetListOfPrimitives());
4827 while ((obj=next())) {
4838 if (
gPad->PadInSelectionMode())
4842 if (
gPad->PadInSelectionMode() || !
gPad->PadInHighlightMode() || (
gPad->PadInHighlightMode() &&
gPad->GetSelected() ==
fXaxis)) {
4853 strlcat(chopt,
"SDH",10);
4854 if (ndivx < 0) strlcat(chopt,
"N",10);
4855 if (
gPad->GetGridx()) {
4856 gridl = (aymax-aymin)/(
gPad->GetY2() -
gPad->GetY1());
4857 strlcat(chopt,
"W",10);
4862 strlcat(chopt,
"G",10);
4884 strlcat(chopt,
"t",10);
4892 if (xAxisPos == 1) {
4908 strlcat(chopt,
"-",10);
4917 umin, umax, ndiv, chopt, gridl, drawGridOnly);
4922 if (
gPad->GetTickx() && !
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode()) {
4924 cw=strstr(chopt,
"-");
4927 strlcat(chopt,
"-",10);
4929 if (
gPad->GetTickx() < 2) strlcat(chopt,
"U",10);
4930 if ((cw=strstr(chopt,
"W"))) *cw=
'z';
4934 uminsave, umaxsave, ndivsave, chopt, gridl, drawGridOnly);
4940 if (
gPad->PadInSelectionMode())
4944 if (
gPad->PadInSelectionMode() || !
gPad->PadInHighlightMode() || (
gPad->PadInHighlightMode() &&
gPad->GetSelected() ==
fYaxis)) {
4949 strlcat(chopt,
"SDH",10);
4950 if (ndivy < 0) strlcat(chopt,
"N",10);
4951 if (
gPad->GetGridy()) {
4952 gridl = (axmax-axmin)/(
gPad->GetX2() -
gPad->GetX1());
4953 strlcat(chopt,
"W",10);
4958 strlcat(chopt,
"G",10);
4980 strlcat(chopt,
"t",10);
4988 if (yAxisPos == 1) {
5004 strlcat(chopt,
"+L",10);
5013 umin, umax, ndiv, chopt, gridl, drawGridOnly);
5018 if (
gPad->GetTicky() && !
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode()) {
5019 if (
gPad->GetTicky() < 2) {
5020 strlcat(chopt,
"U",10);
5023 strlcat(chopt,
"+L",10);
5025 if ((cw=strstr(chopt,
"W"))) *cw=
'z';
5029 uminsave, umaxsave, ndivsave, chopt, gridl, drawGridOnly);
5052 if (hcolor ==
gPad->GetFrameFillColor()) ++hcolor;
5054 box.SetFillColor(hcolor);
5055 box.SetFillStyle(hstyle);
5065 if (ymax < gPad->GetUymin())
continue;
5067 if (ymin < gPad->GetUymin())
ymin =
gPad->GetUymin();
5081 box.SetFillColor(hcolor);
5101 if (!strcmp(xaxis->
GetName(),
"xaxis")) {
5115 if (hcolor ==
gPad->GetFrameFillColor()) ++hcolor;
5117 box.SetFillColor(hcolor);
5118 box.SetFillStyle(hstyle);
5127 if (xmax < gPad->GetUxmin())
continue;
5129 if (xmin < gPad->GetUxmin())
xmin =
gPad->GetUxmin();
5142 box.SetFillColor(hcolor);
5155 while ((obj = next())) {
5176 fH->TAttLine::Modify();
5177 fH->TAttFill::Modify();
5179 Double_t z, xk,xstep, yk, ystep, xcent, ycent, xlow, xup, ylow, yup;
5190 Double_t zminlin = zmin, zmaxlin = zmax;
5196 TIter next(
gPad->GetListOfPrimitives());
5197 while ((h2 = (
TH2 *)next())) {
5247 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
5254 if (kZminNeg && z==0)
continue;
5266 if (dz == 0)
continue;
5268 if (zratio == 0)
continue;
5270 xup = xcent*zratio + xk + xcent;
5271 xlow = 2*(xk + xcent) - xup;
5272 if (xup-xlow < dxmin) xup = xlow+dxmin;
5280 yup = ycent*zratio + yk + ycent;
5281 ylow = 2*(yk + ycent) - yup;
5282 if (yup-ylow < dymin) yup = ylow+dymin;
5295 if (xlow >= xup)
continue;
5296 if (ylow >= yup)
continue;
5300 fH->TAttFill::Modify();
5301 gPad->PaintBox(xlow, ylow, xup, yup);
5303 gPad->PaintLine(xlow, ylow, xup, yup);
5304 gPad->PaintLine(xlow, yup, xup, ylow);
5309 fH->TAttFill::Modify();
5310 gPad->PaintBox(xlow, ylow, xup, yup);
5315 x[0] = xlow;
y[0] = ylow;
5316 x[1] = xlow + bwidth*(xup-xlow);
y[1] = ylow + bwidth*(yup-ylow);
5317 x[2] =
x[1];
y[2] = yup - bwidth*(yup-ylow);
5318 x[3] = xup - bwidth*(xup-xlow);
y[3] =
y[2];
5319 x[4] = xup;
y[4] = yup;
5320 x[5] = xlow;
y[5] = yup;
5321 x[6] = xlow;
y[6] = ylow;
5324 fH->TAttFill::Modify();
5325 gPad->PaintFillArea(7,
x,
y);
5328 x[0] = xlow;
y[0] = ylow;
5329 x[1] = xlow + bwidth*(xup-xlow);
y[1] = ylow + bwidth*(yup-ylow);
5330 x[2] = xup - bwidth*(xup-xlow);
y[2] =
y[1];
5331 x[3] =
x[2];
y[3] = yup - bwidth*(yup-ylow);
5332 x[4] = xup;
y[4] = yup;
5333 x[5] = xup;
y[5] = ylow;
5334 x[6] = xlow;
y[6] = ylow;
5337 fH->TAttFill::Modify();
5338 gPad->PaintFillArea(7,
x,
y);
5346 fH->TAttFill::Modify();
5356 TH1D *hproj =
nullptr;
5371 const Double_t standardCandleWidth = 0.66;
5372 const Double_t standardHistoWidth = 0.8;
5374 double allMaxContent = 0, allMaxIntegral = 0;
5383 if (hproj->
Integral() > allMaxIntegral) allMaxIntegral = hproj->
Integral();
5393 double myIntegral = hproj->
Integral();
5395 if (candleWidth > 0.999 && candleWidth < 1.001) {
5396 candleWidth = standardCandleWidth;
5397 histoWidth = standardHistoWidth;
5401 if (myCandle.
IsViolinScaled() && myMaxContent > 0 && allMaxContent > 0)
5404 histoWidth *= myMaxContent/allMaxContent;
5406 candleWidth *= myIntegral/allMaxIntegral;
5420 if (hproj->
Integral() > allMaxIntegral) allMaxIntegral = hproj->
Integral();
5430 double myIntegral = hproj->
Integral();
5432 if (candleWidth > 0.999 && candleWidth < 1.001) {
5433 candleWidth = standardCandleWidth;
5434 histoWidth = standardHistoWidth;
5438 if (myCandle.
IsViolinScaled() && myMaxContent > 0 && allMaxContent > 0)
5441 histoWidth *= myMaxContent/allMaxContent;
5443 candleWidth *= myIntegral/allMaxIntegral;
5472std::vector<THistRenderingRegion>
5475 std::vector<THistRenderingRegion> regions;
5477 enum STRATEGY { Bins, Pixels } strategy;
5481 if (nBins >= nPixels) {
5493 while (xMin <= 0 && ((pAxis->
GetFirst()+binOffset) != pAxis->
GetLast()) ) {
5503 if (strategy == Bins) {
5521 std::make_pair(bin, bin+1)};
5522 regions.push_back(region);
5531 for (
Int_t pixelIndex=0; pixelIndex<(nPixels-1); pixelIndex++) {
5536 std::make_pair(binLow, binHigh)};
5537 regions.push_back(region);
5543 if (strategy == Bins) {
5550 Int_t xPx1 = xPx0 + nPixels/nBins;
5553 if (xPx1>= nPixels) xPx1 = nPixels-1;
5556 std::make_pair(bin, bin+1)};
5557 regions.push_back(region);
5561 for (
Int_t pixelIndex=0; pixelIndex<nPixels-1; pixelIndex++) {
5563 Int_t binLow = (nBins*pixelIndex)/nPixels + pAxis->
GetFirst();
5564 Int_t binHigh = binLow + nBins/nPixels;
5566 std::make_pair(binLow, binHigh)};
5567 regions.push_back(region);
5582 Error(
"THistPainter::PaintColorLevelsFast(Option_t*)",
5583 "Only cartesian coordinates supported by 'COL2' option. Using 'COL' option instead.");
5596 if ((zmin == -1111) && (zmax == -1111)) {
5600 }
else if (zmin == -1111) {
5603 }
else if (zmax == -1111) {
5621 Error(
"THistPainter::PaintColorLevelsFast(Option_t*)",
5622 "Cannot plot logz because bin content is less than 0.");
5633 std::vector<Double_t> colorBounds(ndiv);
5634 std::vector<Double_t> contours(ndiv, 0);
5642 for (
Int_t i=0; i<ndiv; ++i) {
5643 colorBounds[i] = step*i;
5646 auto pFrame =
gPad->GetFrame();
5647 Int_t px0 =
gPad->XtoPixel(pFrame->GetX1());
5648 Int_t px1 =
gPad->XtoPixel(pFrame->GetX2());
5649 Int_t py0 =
gPad->YtoPixel(pFrame->GetY1());
5650 Int_t py1 =
gPad->YtoPixel(pFrame->GetY2());
5651 Int_t nXPixels = px1-px0;
5652 Int_t nYPixels = py0-py1;
5654 std::vector<Double_t> buffer(nXPixels*nYPixels, 0);
5658 if (xRegions.empty() || yRegions.empty()) {
5659 Error(
"THistPainter::PaintColorLevelFast(Option_t*)",
5660 "Encountered error while computing rendering regions.");
5668 for (
auto& yRegion : yRegions) {
5669 for (
auto& xRegion : xRegions ) {
5671 const auto& xBinRange = xRegion.fBinRange;
5672 const auto& yBinRange = yRegion.fBinRange;
5683 if (z > zmax) z = zmax;
5684 if (z < zmin) z = zmin;
5689 z = colorBounds[
index];
5693 index = 0.001 + ((z - zmin)/dz)*ndiv;
5696 if (
index ==
static_cast<Int_t>(colorBounds.size())) {
5704 }
else if (
index ==
static_cast<Int_t>(colorBounds.size()-1)) {
5708 z = colorBounds[
index];
5719 const auto& xPixelRange = xRegion.fPixelRange;
5720 const auto& yPixelRange = yRegion.fPixelRange;
5721 for (
Int_t xPx = xPixelRange.first; xPx <= xPixelRange.second; ++xPx) {
5722 for (
Int_t yPx = yPixelRange.first; yPx <= yPixelRange.second; ++yPx) {
5734 if (minValue != maxValue) {
5740 buffer[buffer.size()-nXPixels] = 0.95;
5748 pImage->
SetImage(buffer.data(), nXPixels, nYPixels, pPalette);
5752 pImage->
PaintImage(
wid, px0, py1, 0, 0, nXPixels, nYPixels);
5769 Double_t z, zc, xk, xstep, yk, ystep, xlow, xup, ylow, yup;
5785 TIter next(
gPad->GetListOfPrimitives());
5786 while ((h2 = (
TH2 *)next())) {
5818 fH->TAttFill::Modify();
5829 Double_t scale = (dz ? ndivz / dz : 1.0);
5841 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
5846 if (binEntries == 0)
5879 if (xup < gPad->GetUxmin())
continue;
5880 if (yup < gPad->GetUymin())
continue;
5881 if (xlow >
gPad->GetUxmax())
continue;
5882 if (ylow >
gPad->GetUymax())
continue;
5883 if (xlow < gPad->GetUxmin()) xlow =
gPad->GetUxmin();
5884 if (ylow < gPad->GetUymin()) ylow =
gPad->GetUymin();
5885 if (xup >
gPad->GetUxmax()) xup =
gPad->GetUxmax();
5886 if (yup >
gPad->GetUymax()) yup =
gPad->GetUymax();
5891 if (z < zc)
continue;
5893 for (
Int_t k=0; k<ndiv; k++) {
5902 color =
Int_t(0.01+(z-zmin)*scale);
5906 if (theColor > ncolors-1) theColor = ncolors-1;
5908 fH->TAttFill::Modify();
5910 gPad->PaintBox(xlow, ylow, xup, yup);
5926 fH->TAttFill::Modify();
5936 Int_t i, j, count, ncontour, icol,
n, lj,
m, ix, jx, ljfill;
5938 Double_t xsave, ysave, thesave,phisave,
x[4],
y[4], zc[4];
5943 thesave =
gPad->GetTheta();
5944 phisave =
gPad->GetPhi();
5946 gPad->SetTheta(90.);
5948 gPad->SetPhi(phisave);
5949 gPad->SetTheta(thesave);
5960 TIter next(
gPad->GetListOfPrimitives());
5961 while ((obj=next())) {
5978 if (!dt && !dtOld)
return;
5980 fGraph2DPainter = dt ? std::make_unique<TGraph2DPainter>(dt) : std::make_unique<TGraph2DPainter>(dtOld);
5996 if (ncontour == 0) {
6001 Warning(
"PaintContour",
"maximum number of contours is %d, asked for %d",
6012 fH->TAttLine::Modify();
6015 std::vector<std::unique_ptr<TPolyLine>>
polys;
6017 TList *list =
nullptr;
6019 std::vector<Int_t>
np;
6021 np.resize(ncontour);
6022 for (i=0;i<ncontour;i++)
6024 for (i=0;i<ncontour;i++)
6025 polys.emplace_back(std::make_unique<TPolyLine>(100));
6029 gROOT->GetListOfSpecials()->Remove(contours);
6031 for (i=0;i<count;i++) {
6032 list = (
TList*)contours->
At(i);
6033 if (list) list->
Delete();
6039 contours->
SetName(
"contours");
6040 gROOT->GetListOfSpecials()->Add(contours);
6041 for (i=0;i<ncontour;i++) {
6043 contours->
Add(list);
6076 if (ir[0] != ir[1] || ir[1] != ir[2] || ir[2] != ir[3] || ir[3] != ir[0]) {
6081 if (zc[0] <= zc[1])
n = 0;
else n = 1;
6082 if (zc[2] <= zc[3])
m = 2;
else m = 3;
6083 if (zc[
n] > zc[
m])
n =
m;
6086 for (ix=1;ix<=4;ix++) {
6089 ir[
m-1],
x[
m-1],
y[
m-1], xarr.data()+lj-1,yarr.data()+lj-1,itarr.data()+lj-1, levels.data());
6094 if (zc[0] <= zc[1])
n = 0;
else n = 1;
6095 if (zc[2] <= zc[3])
m = 2;
else m = 3;
6096 if (zc[
n] > zc[
m])
n =
m;
6099 for (ix=1;ix<=4;ix++) {
6103 ir[
m-1],
x[
m-1],
y[
m-1],xarr.data()+lj-1,yarr.data()+lj-1,itarr.data()+lj-1, levels.data());
6111 for (ix=1; ix<=lj-5; ix +=2) {
6113 while (itarr[ix-1] != itarr[ix]) {
6117 for (jx=ix; jx<=lj-5; jx +=2) {
6118 xarr[jx] = xarr[jx+2];
6119 yarr[jx] = yarr[jx+2];
6120 itarr[jx] = itarr[jx+2];
6124 itarr[lj-3] = itars;
6125 if (count > 100)
break;
6130 if (count > 100)
continue;
6131 for (ix=1; ix<=lj-2; ix +=2) {
6143 fH->TAttLine::Modify();
6144 gPad->PaintPolyLine(2,xarr.data()+ix-1,yarr.data()+ix-1);
6148 ipoly = itarr[ix-1];
6149 if (ipoly >=0 && ipoly <ncontour) {
6150 polys[ipoly]->SetPoint(
np[ipoly] ,xarr[ix-1],yarr[ix-1]);
6151 polys[ipoly]->SetPoint(
np[ipoly]+1,xarr[ix], yarr[ix]);
6153 if (npmax <
np[ipoly]) npmax =
np[ipoly];
6161 std::vector<Double_t> xp, yp;
6162 Int_t nadd,iminus,iplus;
6165 std::vector<Int_t> polysort;
6177 polysort.resize(ncontour);
6179 for (ipoly=0;ipoly<ncontour;ipoly++) {
6180 if (levels[ipoly] >= 0) {
first = ipoly;
break;}
6184 for (ipoly=
first-1;ipoly>=0;ipoly--) {polysort[k] = ipoly; k++;}
6185 for (ipoly=
first;ipoly<ncontour;ipoly++) {polysort[k] = ipoly; k++;}
6189 for (k=0;k<ncontour;k++) {
6190 ipoly = polysort[k];
6191 if (
np[ipoly] == 0)
continue;
6200 xp[iminus]= xx[istart]; yp[iminus] = yy[istart];
6201 xp[iplus] = xx[istart+1]; yp[iplus] = yy[istart+1];
6202 xx[istart] =
xmin; yy[istart] =
ymin;
6203 xx[istart+1] =
xmin; yy[istart+1] =
ymin;
6206 for (i=2;i<
np[ipoly];i+=2) {
6207 if ((iplus < 2*npmax-1) && (xx[i] == xp[iplus]) && (yy[i] == yp[iplus])) {
6209 xp[iplus] = xx[i+1]; yp[iplus] = yy[i+1];
6214 if ((iminus > 0) && (xx[i+1] == xp[iminus]) && (yy[i+1] == yp[iminus])) {
6216 xp[iminus] = xx[i]; yp[iminus] = yy[i];
6222 if (nadd == 0)
break;
6227 fH->TAttFill::Modify();
6228 gPad->PaintFillArea(iplus-iminus+1,xp.data()+iminus,yp.data()+iminus);
6230 graph =
new TGraph(iplus-iminus+1,xp.data()+iminus,yp.data()+iminus);
6231 graph->SetFillColor(icol);
6237 for (i=2;i<
np[ipoly];i+=2) {
6238 if (xx[i] !=
xmin && yy[i] !=
ymin) {
6243 if (istart == 0)
break;
6264 Double_t tlen, tdif, elev, diff, pdif, xlen;
6276 tdif = elev2 - elev1;
6282 diff = elev - elev1;
6293 yarr[i] =
y1 + xlen;
6298 xarr[i] =
x1 + xlen;
6321 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
return;
6323 const Int_t kBASEMARKER=8;
6324 Double_t xp, yp, ex1, ex2, ey1, ey2;
6326 Double_t s2x, s2y, bxsize, bysize, symbolsize, xerror, sbasex, sbasey;
6327 Double_t xi1, xi2, xi3, xi4, yi1, yi2, yi3, yi4;
6336 Int_t drawmarker, errormarker;
6337 Int_t option0, option1, option2, option3, option4, optionE, optionEX0, optionI0;
6338 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};
6339 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};
6341 std::vector<Double_t> xline, yline;
6342 option0 = option1 = option2 = option3 = option4 = optionE = optionEX0 = optionI0 = 0;
6351 if (
Hoption.
Error == 16) {optionI0 = 1; option4 = 1; option3 = 1;}
6352 if (option2+option3 == 0) optionE = 1;
6367 if (errormarker == 1) symbolsize = 0.01;
6368 sbasex = sbasey = symbolsize*kBASEMARKER;
6369 if (errormarker >= 20 && errormarker <= 49) {
6370 sbasex *= cxx[errormarker-20];
6371 sbasey *= cyy[errormarker-20];
6375 fH->TAttLine::Modify();
6376 fH->TAttFill::Modify();
6377 fH->TAttMarker::Modify();
6384 npoints = last -
first +1;
6392 xline.resize(2*npoints);
6393 yline.resize(2*npoints);
6394 if ((npoints > 0) && (xline.empty() || yline.empty())) {
6395 Error(
"PaintErrors",
"too many points, out of memory");
6403 s2x =
gPad->PixeltoX(
Int_t(0.5*sbasex)) -
gPad->PixeltoX(0);
6404 s2y =-
gPad->PixeltoY(
Int_t(0.5*sbasey)) +
gPad->PixeltoY(0);
6408 bxsize =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
6409 bysize =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
6425 for (k=
first; k<=last; k++) {
6444 xminTmp +=
offset*(xmaxTmp-xminTmp);
6445 xmaxTmp = xminTmp +
w;
6446 xp = (xminTmp+xmaxTmp)/2.;
6449 if (xp <= 0)
goto L30;
6450 if (xp < logxmin)
goto L30;
6453 if (xp <
xmin)
goto L30;
6454 if (xp >
xmax)
break;
6457 if (optionI0 && yp==0)
goto L30;
6509 if (!option0 && !option3) {
6511 if (yi1 < ymin || yi1 >
ymax)
goto L30;
6514 if (!symbolsize || !errormarker) drawmarker =
kFALSE;
6518 if (yi3 >=
ymax)
goto L30;
6519 if (yi4 <=
ymin)
goto L30;
6520 gPad->PaintBox(xi1,yi3,xi2,yi4);
6535 if (optionE && drawmarker) {
6540 if (yi1<ymax && yi1>
ymin) {
6541 if (xi1 < xi3 - s2x)
gPad->PaintLine(xi1,yi1,xi3 - s2x,yi2);
6542 if (xi3 + s2x < xi2)
gPad->PaintLine(xi3 + s2x,yi1,xi2,yi2);
6546 if (optionE && !drawmarker && (ey1 != 0 || ey2 !=0)) {
6551 if (yi1<ymax && yi1>
ymin) {
6552 if (xi1 < xi3)
gPad->PaintLine(xi1,yi1,xi3,yi2);
6553 if (xi3 < xi2)
gPad->PaintLine(xi3,yi1,xi2,yi2);
6560 if (option1 && drawmarker) {
6562 if (yi3 < yi1-s2y && yi3 < ymax && yi3 >
ymin)
gPad->PaintLine(xi3 - bxsize, yi3 , xi3 + bxsize, yi3);
6563 if (yi4 > yi1+s2y && yi4 < ymax && yi4 >
ymin)
gPad->PaintLine(xi3 - bxsize, yi4 , xi3 + bxsize, yi4);
6564 if (yi1 <= ymax && yi1 >=
ymin) {
6565 if (xi1 < xi3-s2x)
gPad->PaintLine(xi1 , yi1 - bysize, xi1 , yi1 + bysize);
6566 if (xi2 > xi3+s2x)
gPad->PaintLine(xi2 , yi1 - bysize, xi2 , yi1 + bysize);
6572 if (drawmarker)
gPad->PaintPolyMarker(1, &xi3, &yi1);
6601 if (if2 > npoints) {
6602 for (i=1; i<if1; i++) {
6603 xline[if1-2+i] = xline[if2-1+i];
6604 yline[if1-2+i] = yline[if2-1+i];
6608 if (option4)
graph.PaintGraph(2*npoints,xline.data(),yline.data(),
"FC");
6609 else graph.PaintGraph(2*npoints,xline.data(),yline.data(),
"F");
6610 gPad->SetLogx(logx);
6611 gPad->SetLogy(logy);
6621 fH->TAttMarker::Modify();
6622 fH->TAttLine::Modify();
6631 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
6634 Error(
"Paint2DErrors",
"no TView in current pad");
6641 view->
SetView(phideg, thedeg, psideg, irep);
6644 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
6645 fLego->SetFillColor(
gPad->GetFrameFillColor());
6646 fLego->TAttFill::Modify();
6652 fLego->TAttFill::Modify();
6656 fLego->InitMoveScreen(-1.1,1.1);
6693 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
6736 gPad->PaintLine3D(temp1, temp2);
6743 gPad->PaintLine3D(temp1, temp2);
6750 gPad->PaintLine3D(temp1, temp2);
6754 view->
WCtoNDC(temp1, &temp2[0]);
6755 gPad->PaintPolyMarker(1, &temp2[0], &temp2[1]);
6761 fLego->InitMoveScreen(-1.1,1.1);
6763 fLego->FrontBox(90);
6788 if (frame)
gPad->GetListOfPrimitives()->Remove(frame);
6794 if (!
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode())
6815 f2->
Paint(
"surf same");
6817 obj->Paint(
"cont3 same");
6820 }
else if (obj->InheritsFrom(
TF1::Class())) {
6824 gPad->PushSelectableObject(obj);
6828 if (!
gPad->PadInHighlightMode() || (
gPad->PadInHighlightMode() && obj ==
gPad->GetSelected()))
6829 obj->Paint(lnk->GetOption());
6843 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
6846 static char chopth[17];
6848 Int_t htype, oldhtype;
6853 strlcpy(chopth,
" ",17);
6868 nbins = last -
first + 1;
6870 std::vector<Double_t> keepx, keepy;
6873 if (fixbin) keepx.resize(2);
6874 else keepx.resize(nbins+1);
6875 keepy.resize(nbins);
6881 for (j=
first; j<=last;j++) {
6891 keepy[j-
first] = yb;
6907 if (htype == 0 || htype == 1000) htype = 1001;
6929 if (!fixbin && strlen(chopth)) {
6954 graph.SetLineWidth(lw);
6957 graph.SetFillStyle(htype);
6964 graph.PaintGrapHist(nbins, keepx.data(), keepy.data() ,chopth);
7003 if (strstr(opt,
"iso")) {
7018 view->
SetView(phideg, thedeg, psideg, irep);
7021 cmd.
Form(
"TPolyMarker3D::PaintH3((TH1 *)0x%zx,\"%s\");",(
size_t)
fH,
option);
7066 while (
auto obj = next()) {
7089 static const char *where =
"PaintInit";
7110 Error(where,
"cannot set X axis to log scale");
7117 TIter next(
gPad->GetListOfPrimitives());
7118 while ((obj = (
TObject *)next())) {
7129 Error(where,
"undefined user's coordinates. Cannot use option SAME");
7133 for (i=
first; i<=last; i++) {
7145 Error(where,
"cannot set X axis to log scale");
7169 Int_t nonNullErrors = 0;
7171 for (i=
first; i<=last;i++) {
7184 if (e1 > 0) nonNullErrors++;
7201 fval =
f1->
Eval(xv[0],0,0);
7213 if (!nonNullErrors) {
7232 Error(where,
"log scale requested with a negative argument (%f)", xm);
7245 if (!
Hoption.
Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)",
ymax);
7253 }
else if (
ymin < 0) {
7273 if (allchan) factor /= allchan;
7274 if (factor == 0) factor = 1;
7292 Error(where,
"Cannot set Y axis to log scale");
7338 static const char *where =
"PaintInitH";
7363 Error(where,
"cannot set Y axis to log scale");
7385 for (i=
first; i<=last;i++) {
7400 fval =
f1->
Eval(xv[0],0,0);
7422 Error(where,
"log scale requested with zero or negative argument (%f)", xm);
7430 if (!
Hoption.
Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)",
xmax);
7438 }
else if (
xmin < 0) {
7452 if (allchan) factor /= allchan;
7453 if (factor == 0) factor = 1;
7464 Error(where,
"Cannot set Y axis to log scale");
7503 Double_t wxyz[8][3] = { {-1,-1,-1}, {1,-1,-1}, {1,1,-1}, {-1,1,-1},
7504 {-1,-1, 1}, {1,-1, 1}, {1,1, 1}, {-1,1, 1} };
7505 Int_t iface[6][4] = { {0,3,2,1}, {4,5,6,7},
7506 {0,1,5,4}, {1,2,6,5}, {2,3,7,6}, {3,0,4,7} };
7520 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
7525 Error(
"PaintH3",
"no TView in current pad");
7532 view->
SetView(phideg, thedeg, psideg, irep);
7538 fLego->InitMoveScreen(-1.1,1.1);
7550 Int_t incrx = (tnorm[ 8] < 0.) ? -1 : +1;
7551 Int_t incry = (tnorm[ 9] < 0.) ? -1 : +1;
7552 Int_t incrz = (tnorm[10] < 0.) ? -1 : +1;
7567 fH->TAttFill::Modify();
7568 fH->TAttLine::Modify();
7577 Double_t pmin[3], pmax[3], sxyz[8][3];
7578 for (
Int_t ix = ix1; ix !=ix2+incrx; ix += incrx) {
7581 for (
Int_t iy = iy1; iy != iy2+incry; iy += incry) {
7584 for (
Int_t iz = iz1; iz != iz2+incrz; iz += incrz) {
7594 if (
w <
wmin)
continue;
7597 if (scale == 0)
continue;
7598 for (
Int_t i=0; i<3; ++i) {
7601 for (
Int_t k=0; k<8; ++k) {
7602 sxyz[k][i] = wxyz[k][i]*
d +
c;
7605 for (
Int_t k=0; k<8; ++k) {
7606 view->
WCtoNDC(&sxyz[k][0],&sxyz[k][0]);
7609 for (
Int_t k=0; k<6; ++k) {
7610 for (
Int_t i=0; i<4; ++i) {
7611 Int_t iv = iface[k][i];
7615 x[4] =
x[0] ;
y[4] =
y[0];
7617 x[5] =
x[2] ;
y[5] =
y[2];
7618 x[6] =
x[3] ;
y[6] =
y[3];
7619 x[7] =
x[1] ;
y[7] =
y[1];
7625 if (z <= 0.)
continue;
7630 if (k == 3 || k == 5) {
7632 }
else if (k == 0 || k == 1) {
7638 fH->TAttFill::Modify();
7639 gPad->PaintFillArea(4,
x,
y);
7640 if (iopt != 3)
gPad->PaintPolyLine(
n,
x,
y);
7669 while (
auto obj = next()) {
7685 fH->TAttFill::Modify();
7695 {-1,-1,-1}, {1,-1,-1}, {1,1,-1}, {-1,1,-1},
7696 {-1,-1, 1}, {1,-1, 1}, {1,1, 1}, {-1,1, 1}
7698 Int_t iface[6][4] = {
7699 {0,3,2,1}, {4,5,6,7},
7700 {0,1,5,4}, {1,2,6,5}, {2,3,7,6}, {3,0,4,7}
7704 {0,-1,0}, {1,0,0}, {0,1,0}, {-1,0,0}
7719 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
7724 Error(
"PaintH3",
"no TView in current pad");
7731 view->
SetView(phideg, thedeg, psideg, irep);
7738 fLego->InitMoveScreen(-1.1,1.1);
7743 fLego->InitRaster(-1.1,-1.1,1.1,1.1,1000,800);
7748 Int_t incrx = (tnorm[ 8] < 0.) ? +1 : -1;
7749 Int_t incry = (tnorm[ 9] < 0.) ? +1 : -1;
7750 Int_t incrz = (tnorm[10] < 0.) ? +1 : -1;
7759 fH->TAttLine::Modify();
7762 const Int_t NTMAX = 100;
7767 Double_t pmin[3], pmax[3], sxyz[8][3], pp[4][2];
7768 for (
Int_t ix = ix1; ix !=ix2+incrx; ix += incrx) {
7771 for (
Int_t iy = iy1; iy != iy2+incry; iy += incry) {
7774 for (
Int_t iz = iz1; iz != iz2+incrz; iz += incrz) {
7783 if (
w <
wmin)
continue;
7786 if (scale == 0)
continue;
7787 for (
Int_t i=0; i<3; ++i) {
7790 for (
Int_t k=0; k<8; ++k) {
7791 sxyz[k][i] = wxyz[k][i]*
d +
c;
7794 for (
Int_t k=0; k<8; ++k) {
7795 view->
WCtoNDC(&sxyz[k][0],&sxyz[k][0]);
7797 for (
Int_t k=0; k<6; ++k) {
7799 view->
FindNormal(normal[k][0], normal[k][1], normal[k][2], zn);
7800 if (zn <= 0)
continue;
7801 for (
Int_t i=0; i<4; ++i) {
7802 Int_t ip = iface[k][i];
7803 pp[i][0] = sxyz[ip][0];
7804 pp[i][1] = sxyz[ip][1];
7806 for (
Int_t i=0; i<4; ++i) {
7808 Int_t i2 = (i == 3) ? 0 : i + 1;
7810 fLego->FindVisibleLine(&pp[i1][0], &pp[i2][0], NTMAX, nt, &
tt[0][0]);
7811 Double_t xdel = pp[i2][0] - pp[i1][0];
7812 Double_t ydel = pp[i2][1] - pp[i1][1];
7814 for (
Int_t it = 0; it < nt; ++it) {
7815 x[0] = pp[i1][0] + xdel*
tt[it][0];
7816 y[0] = pp[i1][1] + ydel*
tt[it][0];
7817 x[1] = pp[i1][0] + xdel*
tt[it][1];
7818 y[1] = pp[i1][1] + ydel*
tt[it][1];
7819 gPad->PaintPolyLine(2,
x,
y);
7826 fLego->FindVisibleLine(&pp[i1][0], &pp[i2][0], NTMAX, nt, &
tt[0][0]);
7827 Double_t xdel = pp[i2][0] - pp[i1][0];
7828 Double_t ydel = pp[i2][1] - pp[i1][1];
7830 for (
Int_t it = 0; it < nt; ++it) {
7831 x[0] = pp[i1][0] + xdel*
tt[it][0];
7832 y[0] = pp[i1][1] + ydel*
tt[it][0];
7833 x[1] = pp[i1][0] + xdel*
tt[it][1];
7834 y[1] = pp[i1][1] + ydel*
tt[it][1];
7835 gPad->PaintPolyLine(2,
x,
y);
7839 fLego->FindVisibleLine(&pp[i1][0], &pp[i2][0], NTMAX, nt, &
tt[0][0]);
7840 xdel = pp[i2][0] - pp[i1][0];
7841 ydel = pp[i2][1] - pp[i1][1];
7842 for (
Int_t it = 0; it < nt; ++it) {
7843 x[0] = pp[i1][0] + xdel*
tt[it][0];
7844 y[0] = pp[i1][1] + ydel*
tt[it][0];
7845 x[1] = pp[i1][0] + xdel*
tt[it][1];
7846 y[1] = pp[i1][1] + ydel*
tt[it][1];
7847 gPad->PaintPolyLine(2,
x,
y);
7850 fLego->FillPolygonBorder(4, &pp[0][0]);
7875 while (
auto obj = next()) {
7906 Int_t ic2 = ic1+nbcol;
7907 Int_t ic3 = ic2+nbcol;
7917 std::vector<Double_t>
x(nx);
7918 std::vector<Double_t>
y(ny);
7919 std::vector<Double_t> z(nz);
7937 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
7941 Error(
"PaintH3Iso",
"no TView in current pad");
7947 view->
SetView(phideg, thedeg, psideg, irep);
7962 for (
Int_t col=0;col<nbcol;col++) {
7968 fLego->InitMoveScreen(-1.1,1.1);
7976 fLego->LightSource(0, ydiff, 0, 0, 0, irep);
7977 fLego->LightSource(1, yligh1, 1, 1, 1, irep);
7978 fLego->SurfaceProperty(qa, qd, qs, 1, irep);
7980 fmax = ydiff*qa + (yligh1+0.1)*(qd+qs);
7981 fLego->SetIsoSurfaceParameters(fmin, fmax, nbcol, ic1, ic2, ic3);
7983 fLego->IsoSurface(1, s, nx, ny, nz,
x.data(),
y.data(), z.data(),
"BF");
7986 fLego->InitMoveScreen(-1.1,1.1);
7988 fLego->FrontBox(90);
8000 while (
auto obj = next()) {
8033 if (deltaz == 0) deltaz = 1;
8080 TH1 * hid =
nullptr;
8081 Color_t colormain = -1, colordark = -1;
8092 drawShadowsInLego1 =
kFALSE;
8118 for (
Int_t id=0;
id<=nids;
id++) {
8121 if (colormain == 1) colormain = 17;
8123 else colordark = colormain;
8124 fLego->SetColorMain(colormain,
id);
8125 fLego->SetColorDark(colordark,
id);
8126 if (
id <= 1)
fLego->SetColorMain(colormain,-1);
8127 if (
id == nids)
fLego->SetColorMain(colormain,99);
8136 Error(
"PaintLego",
"no TView in current pad");
8143 view->
SetView(phideg, thedeg, psideg, irep);
8149 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
8150 fLego->SetFillColor(
gPad->GetFrameFillColor());
8151 fLego->TAttFill::Modify();
8159 fLego->TAttFill::Modify();
8163 if (raster)
fLego->InitRaster(-1.1,-1.1,1.1,1.1,1000,800);
8164 else fLego->InitMoveScreen(-1.1,1.1);
8206 fLego->LegoCartesian(90,nx,ny,
"FB");}
8218 fLego->InitMoveScreen(-1.1,1.1);
8241 Int_t ndivx, ndivy, ndivz, i;
8243 static char chopax[8], chopay[8], chopaz[8];
8244 Int_t ix1, ix2, iy1, iy2, iz1, iz2;
8249 Error(
"PaintLegoAxis",
"no TView in current pad");
8274 view->
AxisVertex(ang, av, ix1, ix2, iy1, iy2, iz1, iz2);
8275 for (i = 1; i <= 8; ++i) {
8276 r[i*3 - 3] = av[i*3 - 3] + av[i*3 - 2]*cosa;
8277 r[i*3 - 2] = av[i*3 - 2]*sina;
8278 r[i*3 - 1] = av[i*3 - 1];
8292 if (!rmin || !rmax)
return;
8295 if (
x1[0] >
x2[0]) strlcpy(chopax,
"SDH=+",8);
8296 else strlcpy(chopax,
"SDH=-",8);
8297 if (
y1[0] >
y2[0]) strlcpy(chopay,
"SDH=+",8);
8298 else strlcpy(chopay,
"SDH=-",8);
8299 if (z2[1] > z1[1]) strlcpy(chopaz,
"SDH=+",8);
8300 else strlcpy(chopaz,
"SDH=-",8);
8314 strlcat(chopax,
"N",8);
8318 strlcat(chopay,
"N",8);
8322 strlcat(chopaz,
"N",8);
8344 strlcat(chopax,
"t",8);
8362 strlcpy(chopay,
"V=+UN",8);
8377 strlcat(chopay,
"t",8);
8400 strlcat(chopaz,
"t",8);
8408 axis->
PaintAxis(z1[0], z1[1], z2[0], z2[1], bmin, bmax, ndivz, chopaz);
8425 delete palette; palette =
nullptr;
8430 delete palette; palette =
nullptr;
8458 fH->TAttMarker::Modify();
8461 Double_t dz, z, xk,xstep, yk, ystep;
8466 if (zmin == 0 && zmax == 0)
return;
8477 if (zmin == 0 && zmax == 0)
return;
8480 if (ncells > 10000) scale /= 5;
8484 if (dz >=
kNMAX || zmax < 1) {
8485 scale = (
kNMAX-1)/dz;
8486 if (ncells > 10000) scale /= 5;
8493 if (zmin >= 0) zmin = 0;
8494 else zmin -= yMARGIN*(zmax-zmin);
8496 Double_t dzmin = yMARGIN*(zmax-zmin);
8497 if (zmin >= 0 && (zmin-dzmin <= 0)) zmin = 0;
8506 strlcpy(optscat,opt.
Data(),100);
8507 char *oscat = strstr(optscat,
"scat=");
8508 char *blank = strstr(oscat,
" ");
if (blank) *blank = 0;
8509 sscanf(oscat+5,
"%lg",&scale);
8523 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
8525 if (z < zmin) z = zmin;
8526 if (z > zmax) z = zmax;
8532 if (z <= 0)
continue;
8536 for (
Int_t loop=0; loop<k; loop++) {
8537 if (k+marker >=
kNMAX) {
8541 fXbuf[marker] = (random.
Rndm()*xstep) + xk;
8542 fYbuf[marker] = (random.
Rndm()*ystep) + yk;
8551 if (
fXbuf[marker] <
gPad->GetUxmin())
break;
8552 if (
fYbuf[marker] <
gPad->GetUymin())
break;
8553 if (
fXbuf[marker] >
gPad->GetUxmax())
break;
8554 if (
fYbuf[marker] >
gPad->GetUymax())
break;
8560 if (marker > 0)
gPad->PaintPolyMarker(marker,
fXbuf.data(),
fYbuf.data());
8615 while (
auto obj = next()) {
8622 if (stats && dostat) {
8628 if (!dofit) fit =
nullptr;
8629 if (dofit == 1) dofit = 111;
8630 if (dostat == 1) dostat = 1111;
8631 Int_t print_name = dostat%10;
8632 Int_t print_entries = (dostat/10)%10;
8633 Int_t print_mean = (dostat/100)%10;
8634 Int_t print_stddev = (dostat/1000)%10;
8635 Int_t print_under = (dostat/10000)%10;
8636 Int_t print_over = (dostat/100000)%10;
8637 Int_t print_integral= (dostat/1000000)%10;
8638 Int_t print_skew = (dostat/10000000)%10;
8639 Int_t print_kurt = (dostat/100000000)%10;
8640 Int_t nlines = print_name + print_entries + print_mean + print_stddev +
8641 print_under + print_over + print_integral +
8642 print_skew + print_kurt;
8643 Int_t print_fval = dofit%10;
8644 Int_t print_ferrors = (dofit/10)%10;
8645 Int_t print_fchi2 = (dofit/100)%10;
8646 Int_t print_fprob = (dofit/1000)%10;
8647 Int_t nlinesf = print_fval + print_fchi2 + print_fprob;
8649 if (print_fval < 2) nlinesf += fit->GetNumberFreeParameters();
8650 else nlinesf += fit->GetNpar();
8656 if (!dostat && !fit) {
8695 if (print_entries) {
8701 if (print_mean == 1) {
8711 if (print_mean == 1) {
8723 if (print_stddev == 1) {
8733 if (print_stddev == 1) {
8754 if (print_integral) {
8755 if (print_integral == 1) {
8765 if (print_skew == 1) {
8776 if (print_kurt == 1) {
8789 Int_t ndf = fit->GetNDF();
8791 tt.Form(tf.
Data(),fit->GetChisquare());
8792 if (print_fchi2) stats->
AddText(
tt.Data());
8798 if (print_fval || print_ferrors) {
8800 for (
Int_t ipar=0;ipar<fit->GetNpar();ipar++) {
8801 fit->GetParLimits(ipar,parmin,parmax);
8802 if (print_fval < 2 && parmin*parmax != 0 && parmin >= parmax)
continue;
8803 if (print_ferrors) {
8804 tf.
Form(
"%-8s = %s%s #pm %s ", fit->GetParName(ipar),
"%",stats->
GetFitFormat(),
8806 tt.Form(tf.
Data(),fit->GetParameter(ipar)
8807 ,fit->GetParError(ipar));
8810 tt.Form(tf.
Data(),fit->GetParameter(ipar));
8834 while (
auto obj = next()) {
8840 if (stats && dostat) {
8846 if (dostat == 1) dostat = 1111;
8847 Int_t print_name = dostat%10;
8848 Int_t print_entries = (dostat/10)%10;
8849 Int_t print_mean = (dostat/100)%10;
8850 Int_t print_stddev = (dostat/1000)%10;
8851 Int_t print_under = (dostat/10000)%10;
8852 Int_t print_over = (dostat/100000)%10;
8853 Int_t print_integral= (dostat/1000000)%10;
8854 Int_t print_skew = (dostat/10000000)%10;
8855 Int_t print_kurt = (dostat/100000000)%10;
8856 Int_t nlines = print_name + print_entries + 2*print_mean + 2*print_stddev + print_integral;
8857 if (print_under || print_over) nlines += 3;
8862 if (!dostat && !fit) {
8902 if (print_entries) {
8908 if (print_mean == 1) {
8927 if (print_stddev == 1) {
8945 if (print_integral) {
8951 if (print_skew == 1) {
8970 if (print_kurt == 1) {
8988 if (print_under || print_over) {
8999 unov[0] = h2->
Integral( 0, firstX-1, lastY+1, cellsY );
9000 unov[1] = h2->
Integral(firstX , lastX , lastY+1, cellsY );
9001 unov[2] = h2->
Integral(lastX+1, cellsX , lastY+1, cellsY );
9002 unov[3] = h2->
Integral( 0, firstX-1, firstY , lastY );
9003 unov[4] = h2->
Integral(firstX , lastX , firstY , lastY );
9004 unov[5] = h2->
Integral(lastX+1, cellsX , firstY , lastY );
9005 unov[6] = h2->
Integral( 0, firstX-1, 0, firstY-1);
9006 unov[7] = h2->
Integral(firstX, lastX, 0, firstY-1);
9007 unov[8] = h2->
Integral(lastX+1, cellsX , 0, firstY-1);
9009 tt.Form(
"%g|%g|%g\n", unov[0], unov[1], unov[2]);
9011 tt.Form(
"%g|%g|%g\n", unov[3], unov[4], unov[5]);
9013 tt.Form(
"%g|%g|%g\n", unov[6], unov[7], unov[8]);
9019 Int_t ndf = fit->GetNDF();
9020 tt.Form(
"#chi^{2} / ndf = %6.4g / %d",fit->GetChisquare(),ndf);
9022 for (
Int_t ipar=0;ipar<fit->GetNpar();ipar++) {
9023 tt.Form(
"%-8s = %5.4g #pm %5.4g ",fit->GetParName(ipar)
9024 ,fit->GetParameter(ipar)
9025 ,fit->GetParError(ipar));
9047 while (
auto obj = next()) {
9053 if (stats && dostat) {
9059 if (dostat == 1) dostat = 1111;
9060 Int_t print_name = dostat%10;
9061 Int_t print_entries = (dostat/10)%10;
9062 Int_t print_mean = (dostat/100)%10;
9063 Int_t print_stddev = (dostat/1000)%10;
9064 Int_t print_under = (dostat/10000)%10;
9065 Int_t print_over = (dostat/100000)%10;
9066 Int_t print_integral= (dostat/1000000)%10;
9067 Int_t print_skew = (dostat/10000000)%10;
9068 Int_t print_kurt = (dostat/100000000)%10;
9069 Int_t nlines = print_name + print_entries + 3*print_mean + 3*print_stddev + print_integral;
9070 if (print_under || print_over) nlines += 3;
9075 if (!dostat && !fit) {
9113 if (print_entries) {
9119 if (print_mean == 1) {
9145 if (print_stddev == 1) {
9170 if (print_integral) {
9175 if (print_skew == 1) {
9201 if (print_kurt == 1) {
9226 if (print_under || print_over) {
9233 Int_t ndf = fit->GetNDF();
9234 tt.Form(
"#chi^{2} / ndf = %6.4g / %d",fit->GetChisquare(),ndf);
9236 for (
Int_t ipar=0;ipar<fit->GetNpar();ipar++) {
9237 tt.Form(
"%-8s = %5.4g #pm %5.4g ",fit->GetParName(ipar)
9238 ,fit->GetParameter(ipar)
9239 ,fit->GetParError(ipar));
9274 if (deltaz == 0) deltaz = 1;
9341 Error(
"PaintSurface",
"no TView in current pad");
9348 view->
SetView(phideg, thedeg, psideg, irep);
9352 fLego->SetFillStyle(0);
9353 fLego->SetFillColor(1);
9355 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
9356 fLego->SetFillColor(
gPad->GetFrameFillColor());
9358 fLego->TAttFill::Modify();
9366 fLego->TAttFill::Modify();
9386 if (raster)
fLego->InitRaster(-1.1,-1.1,1.1,1.1,1000,800);
9387 else fLego->InitMoveScreen(-1.1,1.1);
9400 fLego->LightSource(0, ydiff, 0,0,0,irep);
9401 fLego->LightSource(1, yligh1 ,1,1,1,irep);
9402 fLego->SurfaceProperty(qa, qd, qs, 1, irep);
9404 fmax = fmin + (yligh1+0.1)*(qd+qs);
9409 if (!colref)
return;
9414 for (
Int_t col=0;col<nbcol;col++) {
9419 fLego->Spectrum(nbcol, fmin, fmax, icol1, 1, irep);
9461 fLego->InitMoveScreen(-1.1,1.1);
9481 fLego->InitMoveScreen(-1.1,1.1);
9508 if (!dt && !dtOld)
return;
9512 fGraph2DPainter = dt ? std::make_unique<TGraph2DPainter>(dt) : std::make_unique<TGraph2DPainter>(dtOld);
9519 Error(
"PaintTriangles",
"no TView in current pad, do not use option SAME");
9524 if (!rmin || !rmax)
return;
9540 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
9543 Error(
"PaintTriangles",
"no TView in current pad");
9550 view->
SetView(phideg, thedeg, psideg, irep);
9553 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
9554 fLego->SetFillColor(
gPad->GetFrameFillColor());
9555 fLego->TAttFill::Modify();
9561 fLego->TAttFill::Modify();
9565 fLego->InitMoveScreen(-1.1,1.1);
9576 fLego->InitMoveScreen(-1.1,1.1);
9578 fLego->FrontBox(90);
9602 Warning(
"PaintSurface",
"too many color levels, %d >= 100, reset to 99", ndivz);
9605 std::vector<Double_t> funlevel(ndivz+1);
9606 std::vector<Int_t> colorlevel(ndivz+1);
9609 for (i = 0; i < ndivz; ++i) {
9615 fLego->ColorFunction(ndivz, funlevel.data(), colorlevel.data(), irep);
9683 while (
auto obj = next()) {
9691 if (!
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode()) {
9711 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
return;
9728 while ((obj=next())) {
9730 z =
b->GetContent();
9732 poly =
b->GetPolygon();
9737 g->TAttLine::Modify();
9738 g->TAttMarker::Modify();
9739 g->TAttFill::Modify();
9742 Int_t fc =
g->GetFillColor();
9744 g->SetFillColor(
g->GetLineColor());
9746 g->SetFillStyle(
fs);
9747 g->SetFillColor(fc);
9749 if (fill)
g->Paint(
"F");
9750 if (
mark)
g->Paint(
"P");
9760 while ((
g = (
TGraph*) nextg())) {
9761 g->TAttLine::Modify();
9762 g->TAttMarker::Modify();
9763 g->TAttFill::Modify();
9766 Int_t fc =
g->GetFillColor();
9768 g->SetFillColor(
g->GetLineColor());
9770 g->SetFillStyle(
fs);
9771 g->SetFillColor(fc);
9773 if (fill)
g->Paint(
"F");
9774 if (
mark)
g->Paint(
"P");
9787 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
9790 Int_t ncolors, color, theColor;
9818 while (
auto obj = next()) {
9822 z =
b->GetContent();
9828 if (z < zmin)
continue;
9833 if (z < zc)
continue;
9835 for (
Int_t k=0; k<ndiv; k++) {
9844 color =
Int_t(0.01+(z-zmin)*scale);
9847 if (theColor > ncolors-1) theColor = ncolors-1;
9853 g->TAttFill::Modify();
9864 while ((
g = (
TGraph*) nextg())) {
9866 g->TAttFill::Modify();
9881 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
9884 Int_t k, loop, marker=0;
9885 Double_t z, xk,xstep, yk, ystep, xp, yp;
9899 scale = (
kNMAX-1)/dz;
9913 while ((obj=next())) {
9916 if (
a>maxarea) maxarea =
a;
9921 while ((obj=next())) {
9923 poly =
b->GetPolygon();
9924 z =
b->GetContent();
9925 if (z < zmin) z = zmin;
9926 if (z > zmax) z = zmax;
9932 k =
Int_t((z*scale)*(
b->GetArea()/maxarea));
9935 xstep =
b->GetXMax()-xk;
9936 ystep =
b->GetYMax()-yk;
9941 if (k <= 0 || z <= 0)
continue;
9944 if (k+marker >=
kNMAX) {
9948 xp = (random.
Rndm()*xstep) + xk;
9949 yp = (random.
Rndm()*ystep) + yk;
9950 if (
g->IsInside(xp,yp)) {
9957 if (marker > 0)
gPad->PaintPolyMarker(marker,
fXbuf.data(),
fYbuf.data());
9965 if (k <= 0 || z <= 0)
continue;
9968 if (k+marker >=
kNMAX) {
9972 xp = (random.
Rndm()*xstep) + xk;
9973 yp = (random.
Rndm()*ystep) + yk;
9981 if (marker > 0)
gPad->PaintPolyMarker(marker,
fXbuf.data(),
fYbuf.data());
10004 text.SetTextAlign(22);
10007 text.TAttText::Modify();
10014 while ((obj=next())) {
10016 p =
b->GetPolygon();
10017 x = (
b->GetXMin()+
b->GetXMax())/2;
10022 y = (
b->GetYMin()+
b->GetYMax())/2;
10027 z =
b->GetContent();
10031 tf.
Form(
"#splitline{%s%s}{#pm %s%s}",
10068 getentries =
kTRUE;
10071 text.SetTextAlign(11);
10072 if (
angle == 90)
text.SetTextAlign(12);
10074 text.TAttText::Modify();
10088 if (yt == 0.)
continue;
10098 if (
y >=
gPad->GetY2())
continue;
10099 if (y <= gPad->GetY1())
continue;
10105 text.SetTextAlign(22);
10108 text.TAttText::Modify();
10127 tf.
Form(
"#splitline{%s%s}{#pm %s%s}",
10160 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
10164 Error(
"PaintTF3",
"no TView in current pad");
10170 view->
SetView(phideg, thedeg, psideg, irep);
10172 fLego->InitMoveScreen(-1.1,1.1);
10177 fLego->BackBox(90);
10187 fLego->InitMoveScreen(-1.1,1.1);
10189 fLego->FrontBox(90);
10226 TIter next(
gPad->GetListOfPrimitives());
10227 while ((obj = next())) {
10230 if (strcmp(title->
GetName(),
"title")) {title =
nullptr;
continue;}
10234 if (title)
delete title;
10249 if (ht <= 0) ht = 0.05;
10270 if (talh < 1) talh = 1;
else if (talh > 3) talh = 3;
10272 if (talv < 1) talv = 1;
else if (talv > 3) talv = 3;
10297 if(!
gPad->IsEditable())
delete ptitle;
10305 if (!strcmp(mess,
"SetF3")) {
10409 for (
int i = 0; i < 100; i++) {
10418 theta -= num / den;
10466 Double_t xmin_aid, ymin_aid, xmax_aid, ymax_aid;
10473 if (
xmin > xmin_aid)
xmin = xmin_aid;
10474 if (
ymin > ymin_aid)
ymin = ymin_aid;
10475 if (
xmax < xmax_aid)
xmax = xmax_aid;
10476 if (
ymax < ymax_aid)
ymax = ymax_aid;
10479 func(
Hparam.
xmin*xscale, 0, xmin_aid, ymin_aid);
10480 func(
Hparam.
xmax*xscale, 0, xmax_aid, ymin_aid);
10481 if (
xmin > xmin_aid)
xmin = xmin_aid;
10482 if (
xmax < xmax_aid)
xmax = xmax_aid;
10487 if (
ymin > ymin_aid)
ymin = ymin_aid;
10488 if (
ymax < ymax_aid)
ymax = ymax_aid;
10505 ymin - dyr*
gPad->GetBottomMargin(),
10506 xmax + dxr*
gPad->GetRightMargin(),
10517 if (
h ==
nullptr)
return;
10531 static const char *where =
"TableInit";
10559 Error(where,
"cannot set X axis to log scale");
10588 Error(where,
"cannot set Y axis to log scale");
10624 if (!
Hoption.
Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)", zmax);
10630 if (zmin >= zmax) {
10632 if (zmax > 0) zmin = 0.001*zmax;
10634 if (!
Hoption.
Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)", zmax);
10644 if (allchan) factor /= allchan;
10645 if (factor == 0) factor = 1;
10647 zmax = factor*zmax;
10648 zmin = factor*zmin;
10674 zmax += yMARGIN*(zmax-zmin);
10682 if (zmin >= 0) zmin = 0;
10683 else zmin -= yMARGIN*(zmax-zmin);
10685 Double_t dzmin = yMARGIN*(zmax-zmin);
10686 if (zmin >= 0 && (zmin-dzmin <= 0)) zmin = 0;
10687 else zmin -= dzmin;
10713 tf.
Form(
"%s%s",
"%",
f);
10717 int ie = tv.
Index(
"e");
10718 int iE = tv.
Index(
"E");
10719 int id = tv.
Index(
".");
10723 if (ie >= 0 || iE >= 0) {
10724 if (tv.
Index(
"+") >= 0) {
10726 ef.
Form(
"%s.1f",
"%");
10729 ef.
Form(
"%s.%de",
"%",ie-
id-1);
10731 ef.
Form(
"%s.%dE",
"%",iE-
id-1);
10736 ef.
Form(
"%s.%de",
"%",ie-
id-1);
10738 ef.
Form(
"%s.%dE",
"%",iE-
id-1);
10743 }
else if (
id < 0) {
10744 ef.
Form(
"%s.1f",
"%");
10762 auto c2 =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->FindObject(name2.Data()));
10768 auto c1 =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->FindObject(name1.Data()));
10773 if (nbins <= 0)
return;
10777 Int_t projection = 0;
10778 if (opt.
Contains(
"x")) projection = 1;
10779 if (opt.
Contains(
"y")) projection = 2;
10780 if (opt.
Contains(
"z")) projection = 3;
10781 if (opt.
Contains(
"xy")) projection = 4;
10782 if (opt.
Contains(
"yx")) projection = 5;
10783 if (opt.
Contains(
"xz")) projection = 6;
10784 if (opt.
Contains(
"zx")) projection = 7;
10785 if (opt.
Contains(
"yz")) projection = 8;
10786 if (opt.
Contains(
"zy")) projection = 9;
10791 gROOT->MakeDefCanvas();
10800 auto c2 =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->FindObject(name2.Data()));
10806 auto c1 =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->FindObject(name1.Data()));
10811 if ((nbinsX <= 0) || (nbinsY <= 0))
return;
10816 Int_t projection = 0;
10817 if (opt.
Contains(
"x")) projection = 1;
10818 if (opt.
Contains(
"y")) projection = 2;
10819 if (opt.
Contains(
"z")) projection = 3;
10820 if (opt.
Contains(
"xy")) projection = 4;
10821 if (opt.
Contains(
"yx")) projection = 5;
10822 if (opt.
Contains(
"xz")) projection = 6;
10823 if (opt.
Contains(
"zx")) projection = 7;
10824 if (opt.
Contains(
"yz")) projection = 8;
10825 if (opt.
Contains(
"zy")) projection = 9;
10830 gROOT->MakeDefCanvas();
10833 gROOT->MakeDefCanvas();
10846 gPad->SetDoubleBuffer(0);
10850 static int pyold1 = 0;
10851 static int pyold2 = 0;
10852 float uxmin =
gPad->GetUxmin();
10853 float uxmax =
gPad->GetUxmax();
10854 int pxmin =
gPad->XtoAbsPixel(uxmin);
10855 int pxmax =
gPad->XtoAbsPixel(uxmax);
10882 c->SetLogy(ctxt.
GetSaved()->GetLogz());
10883 c->SetLogx(ctxt.
GetSaved()->GetLogx());
10887 TH1D *hp = ((
TH2*)
fH)->ProjectionX(prjName, biny1, biny2);
10892 if (biny1 == biny2) {
10900 hp->
SetTitle(
TString::Format(
"ProjectionX of biny=%d [y=%.*lf..%.*lf]", biny1, valuePrecision, valueFrom, valuePrecision, valueTo));
10912 hp->
SetTitle(
TString::Format(
"ProjectionX of biny=[%d,%d] [y=%.*lf..%.*lf]", biny1, biny2, valuePrecision, valueFrom, valuePrecision, valueTo));
10931 gPad->SetDoubleBuffer(0);
10935 static int pxold1 = 0;
10936 static int pxold2 = 0;
10937 float uymin =
gPad->GetUymin();
10938 float uymax =
gPad->GetUymax();
10939 int pymin =
gPad->YtoAbsPixel(uymin);
10940 int pymax =
gPad->YtoAbsPixel(uymax);
10970 c->SetLogy(ctxt.
GetSaved()->GetLogz());
10971 c->SetLogx(ctxt.
GetSaved()->GetLogy());
10975 TH1D *hp = ((
TH2*)
fH)->ProjectionY(prjName, binx1, binx2);
10980 if (binx1 == binx2) {
10988 hp->
SetTitle(
TString::Format(
"ProjectionY of binx=%d [x=%.*lf..%.*lf]", binx1, valuePrecision, valueFrom, valuePrecision, valueTo));
11000 hp->
SetTitle(
TString::Format(
"ProjectionY of binx=[%d,%d] [x=%.*lf..%.*lf]", binx1, binx2, valuePrecision, valueFrom, valuePrecision, valueTo));
11036 gPad->SetDoubleBuffer(0);
11052 static TPoint endface1[5];
11053 static TPoint endface2[5];
11062 int pxmin =
gPad->XtoAbsPixel(uxmin);
11063 int pxmax =
gPad->XtoAbsPixel(uxmax);
11064 if (pxmin==pxmax)
return;
11065 int pymin =
gPad->YtoAbsPixel(uymin);
11066 int pymax =
gPad->YtoAbsPixel(uymax);
11067 if (pymin==pymax)
return;
11068 Double_t cx = (pxmax-pxmin)/(uxmax-uxmin);
11069 Double_t cy = (pymax-pymin)/(uymax-uymin);
11085 Int_t biny = firstY +
Int_t((lastY-firstY)*(px-pxmin)/(pxmax-pxmin));
11090 Int_t binz = firstZ +
Int_t((lastZ-firstZ)*(py-pymin)/(pymax-pymin));
11093 if (line1[0].GetX())
gVirtualX->DrawPolyLine(2,line1);
11094 if (nbins>1 && line1[0].GetX()) {
11105 line1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11106 line1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11109 line1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11110 line1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11117 line2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11118 line2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11121 line2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11122 line2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11128 line3[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11129 line3[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11132 line3[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11133 line3[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11139 line4[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11140 line4[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11143 line4[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11144 line4[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11146 endface1[0].
SetX(line1[0].GetX());
11147 endface1[0].
SetY(line1[0].GetY());
11148 endface1[1].
SetX(line2[0].GetX());
11149 endface1[1].
SetY(line2[0].GetY());
11150 endface1[2].
SetX(line3[0].GetX());
11151 endface1[2].
SetY(line3[0].GetY());
11152 endface1[3].
SetX(line4[0].GetX());
11153 endface1[3].
SetY(line4[0].GetY());
11154 endface1[4].
SetX(line1[0].GetX());
11155 endface1[4].
SetY(line1[0].GetY());
11157 endface2[0].
SetX(line1[1].GetX());
11158 endface2[0].
SetY(line1[1].GetY());
11159 endface2[1].
SetX(line2[1].GetX());
11160 endface2[1].
SetY(line2[1].GetY());
11161 endface2[2].
SetX(line3[1].GetX());
11162 endface2[2].
SetY(line3[1].GetY());
11163 endface2[3].
SetX(line4[1].GetX());
11164 endface2[3].
SetY(line4[1].GetY());
11165 endface2[4].
SetX(line1[1].GetX());
11166 endface2[4].
SetY(line1[1].GetY());
11200 Int_t binx = firstX +
Int_t((lastX-firstX)*(px-pxmin)/(pxmax-pxmin));
11205 Int_t binz = firstZ +
Int_t((lastZ-firstZ)*(py-pymin)/(pymax-pymin));
11208 if (line1[0].GetX())
gVirtualX->DrawPolyLine(2,line1);
11209 if (nbins>1 && line1[0].GetX()) {
11220 line1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11221 line1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11224 line1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11225 line1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11232 line2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11233 line2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11236 line2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11237 line2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11243 line3[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11244 line3[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11247 line3[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11248 line3[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11254 line4[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11255 line4[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11258 line4[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11259 line4[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11261 endface1[0].
SetX(line1[0].GetX());
11262 endface1[0].
SetY(line1[0].GetY());
11263 endface1[1].
SetX(line2[0].GetX());
11264 endface1[1].
SetY(line2[0].GetY());
11265 endface1[2].
SetX(line3[0].GetX());
11266 endface1[2].
SetY(line3[0].GetY());
11267 endface1[3].
SetX(line4[0].GetX());
11268 endface1[3].
SetY(line4[0].GetY());
11269 endface1[4].
SetX(line1[0].GetX());
11270 endface1[4].
SetY(line1[0].GetY());
11272 endface2[0].
SetX(line1[1].GetX());
11273 endface2[0].
SetY(line1[1].GetY());
11274 endface2[1].
SetX(line2[1].GetX());
11275 endface2[1].
SetY(line2[1].GetY());
11276 endface2[2].
SetX(line3[1].GetX());
11277 endface2[2].
SetY(line3[1].GetY());
11278 endface2[3].
SetX(line4[1].GetX());
11279 endface2[3].
SetY(line4[1].GetY());
11280 endface2[4].
SetX(line1[1].GetX());
11281 endface2[4].
SetY(line1[1].GetY());
11314 Int_t binx = firstX +
Int_t((lastX-firstX)*(px-pxmin)/(pxmax-pxmin));
11319 Int_t biny = firstY +
Int_t((lastY-firstY)*(py-pymin)/(pymax-pymin));
11322 if (line1[0].GetX())
gVirtualX->DrawPolyLine(2,line1);
11323 if (nbins>1 && line1[0].GetX()) {
11334 line1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11335 line1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11338 line1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11339 line1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11346 line2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11347 line2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11350 line2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11351 line2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11357 line3[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11358 line3[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11361 line3[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11362 line3[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11368 line4[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11369 line4[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11372 line4[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11373 line4[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11375 endface1[0].
SetX(line1[0].GetX());
11376 endface1[0].
SetY(line1[0].GetY());
11377 endface1[1].
SetX(line2[0].GetX());
11378 endface1[1].
SetY(line2[0].GetY());
11379 endface1[2].
SetX(line3[0].GetX());
11380 endface1[2].
SetY(line3[0].GetY());
11381 endface1[3].
SetX(line4[0].GetX());
11382 endface1[3].
SetY(line4[0].GetY());
11383 endface1[4].
SetX(line1[0].GetX());
11384 endface1[4].
SetY(line1[0].GetY());
11386 endface2[0].
SetX(line1[1].GetX());
11387 endface2[0].
SetY(line1[1].GetY());
11388 endface2[1].
SetX(line2[1].GetX());
11389 endface2[1].
SetY(line2[1].GetY());
11390 endface2[2].
SetX(line3[1].GetX());
11391 endface2[2].
SetY(line3[1].GetY());
11392 endface2[3].
SetX(line4[1].GetX());
11393 endface2[3].
SetY(line4[1].GetY());
11394 endface2[4].
SetX(line1[1].GetX());
11395 endface2[4].
SetY(line1[1].GetY());
11431 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11432 if (nbins>1 && rect2[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11437 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11438 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11439 rect1[4].
SetX(rect1[0].GetX());
11440 rect1[4].
SetY(rect1[0].GetY());
11443 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11444 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11447 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11448 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11451 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11452 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11459 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11460 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11461 rect2[4].
SetX(rect2[0].GetX());
11462 rect2[4].
SetY(rect2[0].GetY());
11465 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11466 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11469 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11470 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11473 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11474 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11502 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11503 if (nbins>1 && rect2[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11508 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11509 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11510 rect1[4].
SetX(rect1[0].GetX());
11511 rect1[4].
SetY(rect1[0].GetY());
11514 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11515 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11518 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11519 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11522 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11523 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11530 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11531 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11532 rect2[4].
SetX(rect2[0].GetX());
11533 rect2[4].
SetY(rect2[0].GetY());
11536 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11537 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11540 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11541 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11544 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11545 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11572 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11573 if (nbins>1 && rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11578 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11579 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11580 rect1[4].
SetX(rect1[0].GetX());
11581 rect1[4].
SetY(rect1[0].GetY());
11584 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11585 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11588 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11589 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11592 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11593 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11600 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11601 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11602 rect2[4].
SetX(rect2[0].GetX());
11603 rect2[4].
SetY(rect2[0].GetY());
11606 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11607 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11610 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11611 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11614 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11615 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11642 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11643 if (nbins>1 && rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11648 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11649 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11650 rect1[4].
SetX(rect1[0].GetX());
11651 rect1[4].
SetY(rect1[0].GetY());
11654 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11655 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11658 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11659 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11662 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11663 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11670 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11671 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11672 rect2[4].
SetX(rect2[0].GetX());
11673 rect2[4].
SetY(rect2[0].GetY());
11676 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11677 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11680 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11681 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11684 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11685 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11712 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11713 if (nbins>1 && rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11718 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11719 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11720 rect1[4].
SetX(rect1[0].GetX());
11721 rect1[4].
SetY(rect1[0].GetY());
11724 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11725 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11728 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11729 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11732 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11733 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11740 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11741 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11742 rect2[4].
SetX(rect2[0].GetX());
11743 rect2[4].
SetY(rect2[0].GetY());
11746 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11747 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11750 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11751 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11754 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11755 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11782 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11783 if (nbins>1 && rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11788 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11789 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11790 rect1[4].
SetX(rect1[0].GetX());
11791 rect1[4].
SetY(rect1[0].GetY());
11794 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11795 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11798 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11799 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11802 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11803 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11810 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11811 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11812 rect2[4].
SetX(rect2[0].GetX());
11813 rect2[4].
SetY(rect2[0].GetY());
11816 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11817 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11820 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11821 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11824 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11825 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
Handle_t Window_t
Window handle.
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 wid
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 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 void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
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.
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 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)
virtual void SetAlpha(Float_t a)
void Paint(Option_t *option="") override
Paint this crown with its current attributes.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual Double_t GetXmax() const
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 void SetMinimum(Double_t minimum=-1111)
Set the minimum value along Y for this function In case the function is already drawn,...
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
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.
A 3-Dim 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.
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.
void SetTitle(const char *title) override
Change/set the title.
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 void SetXTitle(const char *title)
virtual Int_t GetDimension() const
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
@ kNoTitle
Don't draw the histogram title.
@ kUserContour
User specified contour levels.
@ kNoStats
Don't draw stats box.
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.
virtual void SetZTitle(const char *title)
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 void SetYTitle(const char *title)
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 Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
static Bool_t AddDirectoryStatus()
Static function: cannot be inlined on Windows/NT.
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.
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.
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.
virtual TH1 * Project3D(Option_t *option="x") const
Project a 3-d histogram into 1 or 2-d histograms depending on the option parameter,...
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
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 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)
virtual void PaintImage(Drawable_t, Int_t, Int_t, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0, Option_t *="")
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
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
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 void Clear(Option_t *="")
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.
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)
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 quidistributed 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
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
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
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
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual void Close(Option_t *option="")=0
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 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.