3255 const Int_t big = 9999;
3256 const Int_t kMaxDiff = 7;
3259 return fPie->DistancetoPrimitive(px, py);
3268 Int_t curdist = big;
3269 Int_t yxaxis, dyaxis,xyaxis, dxaxis;
3272 if (!PadPointer)
return 0;
3286 if (d3 <= kMaxDiff) {
gPad->SetSelected(
fZaxis);
return 0;}
3288 if (d1 <= kMaxDiff) {
gPad->SetSelected(
fXaxis);
return 0;}
3290 if (d2 <= kMaxDiff) {
gPad->SetSelected(
fYaxis);
return 0;}
3291 if ( px > puxmin && px < puxmax && py > puymax && py < puymin) curdist = 1;
3302 if (px <= xyaxis+dyaxis && px >= xyaxis && py >puymax && py < puymin) {
3311 if (px >= xyaxis-dyaxis && px <= xyaxis && py >puymax && py < puymin) {
3323 if (py >= yxaxis-dxaxis && py <= yxaxis && px <puxmax && px > puxmin) {
3332 if (yxaxis < puymin) yxaxis = puymin;
3333 if (py <= yxaxis+dxaxis && py >= yxaxis && px <puxmax && px > puxmin) {
3343 if ((px > puxmin) && (py < puymin) && (px < puxmax) && (py > puymax))
3359 Int_t bin =
th2->FindBin(pxu, pyu);
3360 if (bin>0) curdist = 1;
3366 if ( px > puxmin + delta2
3367 && px < puxmax - delta2
3368 && py > puymax + delta2
3369 && py < puymin - delta2) {curdist =1;
goto FUNCTIONS;}
3373 if (
gPad->IsVertical()) {
3378 if (binval == 0 && pybin < puymin) pybin = 10000;
3384 for (
Int_t ibin=bin+1; ibin<binsup; ibin++) {
3386 if (binvalmin>binvaltmp) binvalmin=binvaltmp;
3387 if (binvalmax<binvaltmp) binvalmax=binvaltmp;
3389 Int_t pybinmin =
gPad->YtoAbsPixel(
gPad->YtoPad(binvalmax));
3390 Int_t pybinmax =
gPad->YtoAbsPixel(
gPad->YtoPad(binvalmin));
3391 if (py<pybinmax+kMaxDiff/2 && py>pybinmin-kMaxDiff/2) pybin = py;
3393 if (bin != binsup) {
3395 Int_t pybinsub =
gPad->YtoAbsPixel(
gPad->YtoPad(binsupval));
3396 if (py <=
TMath::Max(pybinsub,pybin) && py >=
TMath::Min(pybinsub,pybin) && pybin != 10000)
return 0;
3406 if (binval == 0 && pxbin > puxmin) pxbin = 10000;
3412 for (
Int_t ibin=bin+1; ibin<binsup; ibin++) {
3414 if (binvalmin>binvaltmp) binvalmin=binvaltmp;
3415 if (binvalmax<binvaltmp) binvalmax=binvaltmp;
3417 Int_t pxbinmin =
gPad->XtoAbsPixel(
gPad->XtoPad(binvalmax));
3418 Int_t pxbinmax =
gPad->XtoAbsPixel(
gPad->XtoPad(binvalmin));
3419 if (px<pxbinmax+kMaxDiff/2 && px>pxbinmin-kMaxDiff/2) pxbin = px;
3429 if (
f->InheritsFrom(
TF1::Class())) dist =
f->DistancetoPrimitive(-px,py);
3430 else dist =
f->DistancetoPrimitive(px,py);
3431 if (dist < kMaxDiff) {
gPad->SetSelected(
f);
return dist;}
3444 Error(
"DrawPanel",
"need to draw histogram first");
3449 gROOT->ProcessLine(
TString::Format(
"((TCanvas*)0x%zx)->Selected((TVirtualPad*)0x%zx,(TObject*)0x%zx,1)",
3464 static Int_t bin, px1, py1, px2, py2, pyold;
3465 static std::unique_ptr<TBox> zoombox;
3469 Double_t xlow, xup, ylow, binval,
x, baroffset, barwidth, binwidth;
3472 if (!
gPad->IsEditable())
return;
3493 if (IsSame.
Index(
"same")>=0) {
3495 TIter next(
gPad->GetListOfPrimitives());
3496 while ((
h1 = (
TH1 *)next())) {
3513 if (!opaque)
gVirtualX->SetLineColor(-1);
3514 fH->TAttLine::Modify();
3516 if (opaque && dimension ==2) {
3517 zbx1 =
gPad->AbsPixeltoX(px);
3518 zbx2 =
gPad->AbsPixeltoX(px);
3519 zby1 =
gPad->AbsPixeltoY(py);
3520 zby2 =
gPad->AbsPixeltoY(py);
3523 if (
gPad->GetLogx()) {
3527 if (
gPad->GetLogy()) {
3531 if (zoombox)
Error(
"ExecuteEvent",
"Last zoom box was not deleted");
3532 zoombox = std::make_unique<TBox>(zbx1, zby1, zbx2, zby2);
3537 zoombox->SetFillColor(ci);
3549 if (dimension ==1) {
3557 x =
gPad->AbsPixeltoX(px);
3561 xup =
gPad->XtoPad(xlow + barwidth*binwidth);
3562 ylow =
gPad->GetUymin();
3563 px1 =
gPad->XtoAbsPixel(xlow);
3564 px2 =
gPad->XtoAbsPixel(xup);
3565 py1 =
gPad->YtoAbsPixel(ylow);
3575 if (dimension ==1) {
3576 if (
gROOT->GetEditHistograms()) {
3585 binval =
gPad->PadtoY(
gPad->AbsPixeltoY(py2))/factor;
3592 if (opaque && dimension ==2) {
3594 zbx2 =
gPad->AbsPixeltoX(px);
3595 zby2 =
gPad->AbsPixeltoY(py);
3599 zoombox->SetX2(zbx2);
3600 zoombox->SetY2(zby2);
3611 if (dimension ==2) {
3616 if (bin2>bin1) xaxis->
SetRange(bin1,bin2);
3621 if (bin2>bin1) yaxis->
SetRange(bin1,bin2);
3630 if (dimension == 2) {
3635 if (bin2>bin1) xaxis->
SetRange(bin1,bin2);
3640 if (bin2>bin1) yaxis->
SetRange(bin1,bin2);
3648 if (dimension ==1) {
3649 if (
gROOT->GetEditHistograms()) {
3650 binval =
gPad->PadtoY(
gPad->AbsPixeltoY(py2))/factor;
3658 if (opaque && dimension ==2) {
3676 if (opaque)
gVirtualX->SetLineColor(-1);
3686 event =
gVirtualX->RequestLocator(1, 1, px, py);
3710 if (!dt && !dtOld)
return nullptr;
3715 ((
THistPainter*)
this)->fGraph2DPainter = dt ? std::make_unique<TGraph2DPainter>(dt) : std::make_unique<TGraph2DPainter>(dtOld);
3727 if (!
gPad)
return (
char*)
"";
3737 if (
gPad->GetView() || drawOption.
Index(
"cont") >= 0) {
3738 uxmin=
gPad->GetUxmin();
3739 uxmax=
gPad->GetUxmax();
3743 uymin=
gPad->GetUymin();
3744 uymax=
gPad->GetUymax();
3750 Int_t binx,biny,binmin=0,binx1;
3751 if (
gPad->IsVertical()) {
3753 if (drawOption.
Index(
"same") >= 0) {
3755 TIter next(
gPad->GetListOfPrimitives());
3756 while ((
h1 = (
TH1 *)next())) {
3769 for (
Int_t ibin=binx+1; ibin<binx1; ibin++) {
3781 if (drawOption.
Index(
"same") >= 0) {
3783 TIter next(
gPad->GetListOfPrimitives());
3784 while ((
h1 = (
TH1 *)next())) {
3797 for (
Int_t ibin=binx+1; ibin<binx1; ibin++) {
3823 biny =
th2->FindBin(
x,
y);
3825 th2->GetBinTitle(biny),
x,
y,biny,
th2->GetBinContent(biny));
3831 fObjectInfo.
Form(
"(x=%g, y=%g, binx=%d, biny=%d, binc=%g, bine=%g, binn=%d)",
3887 if (!changedBin)
return;
3913 if (
gPad->GetLogx()) {
3917 if (
gPad->GetLogy()) {
3924 if (
gPad->IsVertical()) {
3926 if ((hcenter < uxmin) || (hcenter > uxmax))
return;
3929 if ((hcenter < uymin) || (hcenter > uymax))
return;
3933 if ((hcenter < uymin) || (hcenter > uymax))
return;
3938 if (
gPad->IsVertical()) {
4028 Int_t nch = strlen(choptin);
4029 strlcpy(chopt,choptin,128);
4055 for (
Int_t i=0;i<nch;i++) chopt[i] = toupper(chopt[i]);
4061 char *l1 = strstr(chopt,
"PFC");
4062 char *l2 = strstr(chopt,
"PLC");
4063 char *l3 = strstr(chopt,
"PMC");
4064 if (l1 || l2 || l3) {
4072 l = strstr(chopt,
"MIN0");
4078 l = strstr(chopt,
"SPEC");
4083 l = strstr(chopt,
"BF(");
4085 if (sscanf(&
l[3],
"%d",&bs) > 0) {
4098 l = strstr(chopt,
"GL");
4102 l = strstr(chopt,
"X+");
4107 l = strstr(chopt,
"Y+");
4115 l = strstr(chopt,
"SAMES");
4122 l = strstr(chopt,
"SAME");
4130 l = strstr(chopt,
"PIE");
4137 l = strstr(chopt,
"CANDLE");
4144 l = strstr(chopt,
"VIOLIN");
4151 l = strstr(chopt,
"LEGO");
4162 l = strstr(chopt,
"0");
if (
l) {
Hoption.
Zero = 1; memcpy(
l,
" ",1); }
4165 l = strstr(chopt,
"SURF");
4180 l = strstr(chopt,
"TF3");
4187 l = strstr(chopt,
"ISO");
4194 l = strstr(chopt,
"LIST");
if (
l) {
Hoption.
List = 1; memcpy(
l,
" ",4);}
4196 l = strstr(chopt,
"CONT");
4211 l = strstr(chopt,
"HBAR");
4220 l = strstr(chopt,
"BAR");
4230 l = strstr(chopt,
"ARR" );
4236 l = strstr(chopt,
"COL");
if (
l) {
Hoption.
Arrow = 2; memcpy(
l,
" ",3); }
4242 l = strstr(chopt,
"BOX" );
4255 l = strstr(chopt,
"COLZ");
4263 l = strstr(chopt,
"0");
if (
l) {
Hoption.
Zero = 1; memcpy(
l,
" ",1); }
4269 l = strstr(chopt,
"COL" );
4276 l = strstr(chopt,
"0");
if (
l) {
Hoption.
Zero = 1; memcpy(
l,
" ",1); }
4284 l = strstr(chopt,
"AXIS");
if (
l) {
Hoption.
Axis = 1; memcpy(
l,
" ",4); }
4285 l = strstr(chopt,
"AXIG");
if (
l) {
Hoption.
Axis = 2; memcpy(
l,
" ",4); }
4286 l = strstr(chopt,
"SCAT");
if (
l) {
Hoption.
Scat = 1; memcpy(
l,
" ",4); }
4287 l = strstr(chopt,
"TEXT");
4290 if (sscanf(&
l[4],
"%d",&
angle) > 0) {
4298 l = strstr(chopt,
"N");
4307 l = strstr(chopt,
"TRI");
4314 l = strstr(chopt,
"ERR");
if (
l) memcpy(
l,
" ",3);
4317 l = strstr(chopt,
"AITOFF");
4321 l = strstr(chopt,
"MERCATOR");
4325 l = strstr(chopt,
"SINUSOIDAL");
4329 l = strstr(chopt,
"PARABOLIC");
4355 if (strstr(chopt,
"E")) {
4365 if (strstr(chopt,
"X0")) {
4388 Warning(
"MakeChopt",
"option SURF5 is not supported in Cartesian and Polar modes");
4409 char *left = (
char*)strchr(choptin,
'[');
4410 if (!left)
return 0;
4411 char *right = (
char*)strchr(choptin,
']');
4412 if (!right)
return 0;
4413 Int_t nch = right-left;
4414 if (nch < 2)
return 0;
4415 char *cuts = left+1;
4417 char *comma, *minus;
4420 comma = strchr(cuts,
',');
4421 if (comma) *comma = 0;
4422 minus = strchr(cuts,
'-');
4423 if (minus) cuts = minus+1;
4424 while (*cuts ==
' ') cuts++;
4425 Int_t nc = strlen(cuts);
4426 while (cuts[nc-1] ==
' ') {cuts[nc-1] = 0; nc--;}
4430 while ((obj = next())) {
4432 if (strcmp(obj->
GetName(),cuts))
continue;
4445 for (i=0;i<=nch;i++) left[i] =
' ';
4473 gROOT->ProcessLineFast(
TString::Format(
"TSpectrum2Painter::PaintSpectrum((TH2F*)0x%zx,\"%s\",%d)",
4486 fPie = std::make_unique<TPie>(
fH);
4489 Error(
"Paint",
"Option PIE is for 1D histograms only");
4523 Int_t logysav=0, logzsav=0;
4560 gPad->RangeAxisChanged();
4578 if (gridx)
gPad->SetGridx(0);
4579 if (gridy)
gPad->SetGridy(0);
4581 if (gridx)
gPad->SetGridx(1);
4582 if (gridy)
gPad->SetGridy(1);
4617 if (gridx)
gPad->SetGridx(0);
4618 if (gridy)
gPad->SetGridy(0);
4620 if (gridx)
gPad->SetGridx(1);
4621 if (gridy)
gPad->SetGridy(1);
4630 while ((obj = next())) {
4638 if (!
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode())
4665 arrow->SetAngle(30);
4666 arrow->SetFillStyle(1001);
4672 Int_t ncolors=0, ndivz=0;
4686 for (
Int_t id=1;
id<=2;
id++) {
4693 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
4711 }
else if (
id == 2) {
4723 if (theColor > ncolors-1) theColor = ncolors-1;
4753 if (drawGridOnly && (
gPad->PadInHighlightMode() ||
gPad->PadInSelectionMode()))
4761 TAxis *xaxis =
nullptr;
4762 TAxis *yaxis =
nullptr;
4765 TIter next(
gPad->GetListOfPrimitives());
4768 while ((obj = next())) {
4774 if (strstr(opt,
"hbar")) {
4778 if (!strcmp(xaxis->
GetName(),
"xaxis")) {
4788 static char chopt[10] =
"";
4790 Int_t ndiv, ndivx, ndivy, nx1, nx2, ndivsave;
4791 Int_t useHparam = 0;
4792 Double_t umin, umax, uminsave, umaxsave;
4808 TIter next(
gPad->GetListOfPrimitives());
4809 while ((obj=next())) {
4820 if (
gPad->PadInSelectionMode())
4824 if (
gPad->PadInSelectionMode() || !
gPad->PadInHighlightMode() || (
gPad->PadInHighlightMode() &&
gPad->GetSelected() ==
fXaxis)) {
4835 strlcat(chopt,
"SDH",10);
4836 if (ndivx < 0) strlcat(chopt,
"N",10);
4837 if (
gPad->GetGridx()) {
4838 gridl = (aymax-aymin)/(
gPad->GetY2() -
gPad->GetY1());
4839 strlcat(chopt,
"W",10);
4844 strlcat(chopt,
"G",10);
4866 strlcat(chopt,
"t",10);
4874 if (xAxisPos == 1) {
4890 strlcat(chopt,
"-",10);
4899 umin, umax, ndiv, chopt, gridl, drawGridOnly);
4904 if (
gPad->GetTickx() && !
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode()) {
4906 cw=strstr(chopt,
"-");
4909 strlcat(chopt,
"-",10);
4911 if (
gPad->GetTickx() < 2) strlcat(chopt,
"U",10);
4912 if ((cw=strstr(chopt,
"W"))) *cw=
'z';
4916 uminsave, umaxsave, ndivsave, chopt, gridl, drawGridOnly);
4922 if (
gPad->PadInSelectionMode())
4926 if (
gPad->PadInSelectionMode() || !
gPad->PadInHighlightMode() || (
gPad->PadInHighlightMode() &&
gPad->GetSelected() ==
fYaxis)) {
4931 strlcat(chopt,
"SDH",10);
4932 if (ndivy < 0) strlcat(chopt,
"N",10);
4933 if (
gPad->GetGridy()) {
4934 gridl = (axmax-axmin)/(
gPad->GetX2() -
gPad->GetX1());
4935 strlcat(chopt,
"W",10);
4940 strlcat(chopt,
"G",10);
4962 strlcat(chopt,
"t",10);
4970 if (yAxisPos == 1) {
4986 strlcat(chopt,
"+L",10);
4995 umin, umax, ndiv, chopt, gridl, drawGridOnly);
5000 if (
gPad->GetTicky() && !
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode()) {
5001 if (
gPad->GetTicky() < 2) {
5002 strlcat(chopt,
"U",10);
5005 strlcat(chopt,
"+L",10);
5007 if ((cw=strstr(chopt,
"W"))) *cw=
'z';
5011 uminsave, umaxsave, ndivsave, chopt, gridl, drawGridOnly);
5034 if (hcolor ==
gPad->GetFrameFillColor()) ++hcolor;
5036 box.SetFillColor(hcolor);
5037 box.SetFillStyle(hstyle);
5047 if (ymax < gPad->GetUymin())
continue;
5049 if (ymin < gPad->GetUymin())
ymin =
gPad->GetUymin();
5063 box.SetFillColor(hcolor);
5083 if (!strcmp(xaxis->
GetName(),
"xaxis")) {
5097 if (hcolor ==
gPad->GetFrameFillColor()) ++hcolor;
5099 box.SetFillColor(hcolor);
5100 box.SetFillStyle(hstyle);
5109 if (xmax < gPad->GetUxmin())
continue;
5111 if (xmin < gPad->GetUxmin())
xmin =
gPad->GetUxmin();
5124 box.SetFillColor(hcolor);
5137 while ((obj = next())) {
5158 fH->TAttLine::Modify();
5159 fH->TAttFill::Modify();
5161 Double_t z, xk,xstep, yk, ystep, xcent, ycent, xlow, xup, ylow, yup;
5172 Double_t zminlin = zmin, zmaxlin = zmax;
5178 TIter next(
gPad->GetListOfPrimitives());
5179 while ((h2 = (
TH2 *)next())) {
5229 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
5236 if (kZminNeg && z==0)
continue;
5248 if (dz == 0)
continue;
5250 if (zratio == 0)
continue;
5252 xup = xcent*zratio + xk + xcent;
5253 xlow = 2*(xk + xcent) - xup;
5254 if (xup-xlow < dxmin) xup = xlow+dxmin;
5262 yup = ycent*zratio + yk + ycent;
5263 ylow = 2*(yk + ycent) - yup;
5264 if (yup-ylow < dymin) yup = ylow+dymin;
5277 if (xlow >= xup)
continue;
5278 if (ylow >= yup)
continue;
5282 fH->TAttFill::Modify();
5283 gPad->PaintBox(xlow, ylow, xup, yup);
5285 gPad->PaintLine(xlow, ylow, xup, yup);
5286 gPad->PaintLine(xlow, yup, xup, ylow);
5291 fH->TAttFill::Modify();
5292 gPad->PaintBox(xlow, ylow, xup, yup);
5297 x[0] = xlow;
y[0] = ylow;
5298 x[1] = xlow + bwidth*(xup-xlow);
y[1] = ylow + bwidth*(yup-ylow);
5299 x[2] =
x[1];
y[2] = yup - bwidth*(yup-ylow);
5300 x[3] = xup - bwidth*(xup-xlow);
y[3] =
y[2];
5301 x[4] = xup;
y[4] = yup;
5302 x[5] = xlow;
y[5] = yup;
5303 x[6] = xlow;
y[6] = ylow;
5306 fH->TAttFill::Modify();
5307 gPad->PaintFillArea(7,
x,
y);
5310 x[0] = xlow;
y[0] = ylow;
5311 x[1] = xlow + bwidth*(xup-xlow);
y[1] = ylow + bwidth*(yup-ylow);
5312 x[2] = xup - bwidth*(xup-xlow);
y[2] =
y[1];
5313 x[3] =
x[2];
y[3] = yup - bwidth*(yup-ylow);
5314 x[4] = xup;
y[4] = yup;
5315 x[5] = xup;
y[5] = ylow;
5316 x[6] = xlow;
y[6] = ylow;
5319 fH->TAttFill::Modify();
5320 gPad->PaintFillArea(7,
x,
y);
5328 fH->TAttFill::Modify();
5338 TH1D *hproj =
nullptr;
5353 const Double_t standardCandleWidth = 0.66;
5354 const Double_t standardHistoWidth = 0.8;
5356 double allMaxContent = 0, allMaxIntegral = 0;
5365 if (hproj->
Integral() > allMaxIntegral) allMaxIntegral = hproj->
Integral();
5375 double myIntegral = hproj->
Integral();
5377 if (candleWidth > 0.999 && candleWidth < 1.001) {
5378 candleWidth = standardCandleWidth;
5379 histoWidth = standardHistoWidth;
5383 if (myCandle.
IsViolinScaled() && myMaxContent > 0 && allMaxContent > 0)
5386 histoWidth *= myMaxContent/allMaxContent;
5388 candleWidth *= myIntegral/allMaxIntegral;
5402 if (hproj->
Integral() > allMaxIntegral) allMaxIntegral = hproj->
Integral();
5412 double myIntegral = hproj->
Integral();
5414 if (candleWidth > 0.999 && candleWidth < 1.001) {
5415 candleWidth = standardCandleWidth;
5416 histoWidth = standardHistoWidth;
5420 if (myCandle.
IsViolinScaled() && myMaxContent > 0 && allMaxContent > 0)
5423 histoWidth *= myMaxContent/allMaxContent;
5425 candleWidth *= myIntegral/allMaxIntegral;
5454std::vector<THistRenderingRegion>
5457 std::vector<THistRenderingRegion> regions;
5459 enum STRATEGY { Bins, Pixels } strategy;
5463 if (nBins >= nPixels) {
5475 while (xMin <= 0 && ((pAxis->
GetFirst()+binOffset) != pAxis->
GetLast()) ) {
5485 if (strategy == Bins) {
5503 std::make_pair(bin, bin+1)};
5504 regions.push_back(region);
5513 for (
Int_t pixelIndex=0; pixelIndex<(nPixels-1); pixelIndex++) {
5518 std::make_pair(binLow, binHigh)};
5519 regions.push_back(region);
5525 if (strategy == Bins) {
5532 Int_t xPx1 = xPx0 + nPixels/nBins;
5535 if (xPx1>= nPixels) xPx1 = nPixels-1;
5538 std::make_pair(bin, bin+1)};
5539 regions.push_back(region);
5543 for (
Int_t pixelIndex=0; pixelIndex<nPixels-1; pixelIndex++) {
5545 Int_t binLow = (nBins*pixelIndex)/nPixels + pAxis->
GetFirst();
5546 Int_t binHigh = binLow + nBins/nPixels;
5548 std::make_pair(binLow, binHigh)};
5549 regions.push_back(region);
5564 Error(
"THistPainter::PaintColorLevelsFast(Option_t*)",
5565 "Only cartesian coordinates supported by 'COL2' option. Using 'COL' option instead.");
5578 if ((zmin == -1111) && (zmax == -1111)) {
5582 }
else if (zmin == -1111) {
5585 }
else if (zmax == -1111) {
5603 Error(
"THistPainter::PaintColorLevelsFast(Option_t*)",
5604 "Cannot plot logz because bin content is less than 0.");
5615 std::vector<Double_t> colorBounds(ndiv);
5616 std::vector<Double_t> contours(ndiv, 0);
5624 for (
Int_t i=0; i<ndiv; ++i) {
5625 colorBounds[i] = step*i;
5628 auto pFrame =
gPad->GetFrame();
5629 Int_t px0 =
gPad->XtoPixel(pFrame->GetX1());
5630 Int_t px1 =
gPad->XtoPixel(pFrame->GetX2());
5631 Int_t py0 =
gPad->YtoPixel(pFrame->GetY1());
5632 Int_t py1 =
gPad->YtoPixel(pFrame->GetY2());
5633 Int_t nXPixels = px1-px0;
5634 Int_t nYPixels = py0-py1;
5636 std::vector<Double_t> buffer(nXPixels*nYPixels, 0);
5640 if (xRegions.size() == 0 || yRegions.size() == 0) {
5641 Error(
"THistPainter::PaintColorLevelFast(Option_t*)",
5642 "Encountered error while computing rendering regions.");
5650 for (
auto& yRegion : yRegions) {
5651 for (
auto& xRegion : xRegions ) {
5653 const auto& xBinRange = xRegion.fBinRange;
5654 const auto& yBinRange = yRegion.fBinRange;
5665 if (z > zmax) z = zmax;
5666 if (z < zmin) z = zmin;
5671 z = colorBounds[
index];
5675 index = 0.001 + ((z - zmin)/dz)*ndiv;
5678 if (
index ==
static_cast<Int_t>(colorBounds.size())) {
5686 }
else if (
index ==
static_cast<Int_t>(colorBounds.size()-1)) {
5690 z = colorBounds[
index];
5701 const auto& xPixelRange = xRegion.fPixelRange;
5702 const auto& yPixelRange = yRegion.fPixelRange;
5703 for (
Int_t xPx = xPixelRange.first; xPx <= xPixelRange.second; ++xPx) {
5704 for (
Int_t yPx = yPixelRange.first; yPx <= yPixelRange.second; ++yPx) {
5716 if (minValue != maxValue) {
5722 buffer[buffer.size()-nXPixels] = 0.95;
5730 pImage->
SetImage(buffer.data(), nXPixels, nYPixels, pPalette);
5734 pImage->
PaintImage(
wid, px0, py1, 0, 0, nXPixels, nYPixels);
5751 Double_t z, zc, xk, xstep, yk, ystep, xlow, xup, ylow, yup;
5767 TIter next(
gPad->GetListOfPrimitives());
5768 while ((h2 = (
TH2 *)next())) {
5800 fH->TAttFill::Modify();
5811 Double_t scale = (dz ? ndivz / dz : 1.0);
5823 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
5828 if (binEntries == 0)
5861 if (xup < gPad->GetUxmin())
continue;
5862 if (yup < gPad->GetUymin())
continue;
5863 if (xlow >
gPad->GetUxmax())
continue;
5864 if (ylow >
gPad->GetUymax())
continue;
5865 if (xlow < gPad->GetUxmin()) xlow =
gPad->GetUxmin();
5866 if (ylow < gPad->GetUymin()) ylow =
gPad->GetUymin();
5867 if (xup >
gPad->GetUxmax()) xup =
gPad->GetUxmax();
5868 if (yup >
gPad->GetUymax()) yup =
gPad->GetUymax();
5873 if (z < zc)
continue;
5875 for (
Int_t k=0; k<ndiv; k++) {
5884 color =
Int_t(0.01+(z-zmin)*scale);
5888 if (theColor > ncolors-1) theColor = ncolors-1;
5890 fH->TAttFill::Modify();
5892 gPad->PaintBox(xlow, ylow, xup, yup);
5908 fH->TAttFill::Modify();
5918 Int_t i, j, count, ncontour, icol,
n, lj,
m, ix, jx, ljfill;
5920 Double_t xsave, ysave, thesave,phisave,
x[4],
y[4], zc[4];
5925 thesave =
gPad->GetTheta();
5926 phisave =
gPad->GetPhi();
5928 gPad->SetTheta(90.);
5930 gPad->SetPhi(phisave);
5931 gPad->SetTheta(thesave);
5942 TIter next(
gPad->GetListOfPrimitives());
5943 while ((obj=next())) {
5960 if (!dt && !dtOld)
return;
5962 fGraph2DPainter = dt ? std::make_unique<TGraph2DPainter>(dt) : std::make_unique<TGraph2DPainter>(dtOld);
5978 if (ncontour == 0) {
5983 Warning(
"PaintContour",
"maximum number of contours is %d, asked for %d",
5994 fH->TAttLine::Modify();
5997 std::vector<std::unique_ptr<TPolyLine>>
polys;
5999 TList *list =
nullptr;
6001 std::vector<Int_t>
np;
6003 np.resize(ncontour);
6004 for (i=0;i<ncontour;i++)
6006 for (i=0;i<ncontour;i++)
6007 polys.emplace_back(std::make_unique<TPolyLine>(100));
6011 gROOT->GetListOfSpecials()->Remove(contours);
6013 for (i=0;i<count;i++) {
6014 list = (
TList*)contours->
At(i);
6015 if (list) list->
Delete();
6021 contours->
SetName(
"contours");
6022 gROOT->GetListOfSpecials()->Add(contours);
6023 for (i=0;i<ncontour;i++) {
6025 contours->
Add(list);
6058 if (ir[0] != ir[1] || ir[1] != ir[2] || ir[2] != ir[3] || ir[3] != ir[0]) {
6063 if (zc[0] <= zc[1])
n = 0;
else n = 1;
6064 if (zc[2] <= zc[3])
m = 2;
else m = 3;
6065 if (zc[
n] > zc[
m])
n =
m;
6068 for (ix=1;ix<=4;ix++) {
6071 ir[
m-1],
x[
m-1],
y[
m-1], xarr.data()+lj-1,yarr.data()+lj-1,itarr.data()+lj-1, levels.data());
6076 if (zc[0] <= zc[1])
n = 0;
else n = 1;
6077 if (zc[2] <= zc[3])
m = 2;
else m = 3;
6078 if (zc[
n] > zc[
m])
n =
m;
6081 for (ix=1;ix<=4;ix++) {
6085 ir[
m-1],
x[
m-1],
y[
m-1],xarr.data()+lj-1,yarr.data()+lj-1,itarr.data()+lj-1, levels.data());
6093 for (ix=1; ix<=lj-5; ix +=2) {
6095 while (itarr[ix-1] != itarr[ix]) {
6099 for (jx=ix; jx<=lj-5; jx +=2) {
6100 xarr[jx] = xarr[jx+2];
6101 yarr[jx] = yarr[jx+2];
6102 itarr[jx] = itarr[jx+2];
6106 itarr[lj-3] = itars;
6107 if (count > 100)
break;
6112 if (count > 100)
continue;
6113 for (ix=1; ix<=lj-2; ix +=2) {
6125 fH->TAttLine::Modify();
6126 gPad->PaintPolyLine(2,xarr.data()+ix-1,yarr.data()+ix-1);
6130 ipoly = itarr[ix-1];
6131 if (ipoly >=0 && ipoly <ncontour) {
6132 polys[ipoly]->SetPoint(
np[ipoly] ,xarr[ix-1],yarr[ix-1]);
6133 polys[ipoly]->SetPoint(
np[ipoly]+1,xarr[ix], yarr[ix]);
6135 if (npmax <
np[ipoly]) npmax =
np[ipoly];
6143 std::vector<Double_t> xp, yp;
6144 Int_t nadd,iminus,iplus;
6147 std::vector<Int_t> polysort;
6159 polysort.resize(ncontour);
6161 for (ipoly=0;ipoly<ncontour;ipoly++) {
6162 if (levels[ipoly] >= 0) {
first = ipoly;
break;}
6166 for (ipoly=
first-1;ipoly>=0;ipoly--) {polysort[k] = ipoly; k++;}
6167 for (ipoly=
first;ipoly<ncontour;ipoly++) {polysort[k] = ipoly; k++;}
6171 for (k=0;k<ncontour;k++) {
6172 ipoly = polysort[k];
6173 if (
np[ipoly] == 0)
continue;
6182 xp[iminus]= xx[istart]; yp[iminus] = yy[istart];
6183 xp[iplus] = xx[istart+1]; yp[iplus] = yy[istart+1];
6184 xx[istart] =
xmin; yy[istart] =
ymin;
6185 xx[istart+1] =
xmin; yy[istart+1] =
ymin;
6188 for (i=2;i<
np[ipoly];i+=2) {
6189 if ((iplus < 2*npmax-1) && (xx[i] == xp[iplus]) && (yy[i] == yp[iplus])) {
6191 xp[iplus] = xx[i+1]; yp[iplus] = yy[i+1];
6196 if ((iminus > 0) && (xx[i+1] == xp[iminus]) && (yy[i+1] == yp[iminus])) {
6198 xp[iminus] = xx[i]; yp[iminus] = yy[i];
6204 if (nadd == 0)
break;
6209 fH->TAttFill::Modify();
6210 gPad->PaintFillArea(iplus-iminus+1,xp.data()+iminus,yp.data()+iminus);
6212 graph =
new TGraph(iplus-iminus+1,xp.data()+iminus,yp.data()+iminus);
6213 graph->SetFillColor(icol);
6219 for (i=2;i<
np[ipoly];i+=2) {
6220 if (xx[i] !=
xmin && yy[i] !=
ymin) {
6225 if (istart == 0)
break;
6246 Double_t tlen, tdif, elev, diff, pdif, xlen;
6258 tdif = elev2 - elev1;
6264 diff = elev - elev1;
6275 yarr[i] =
y1 + xlen;
6280 xarr[i] =
x1 + xlen;
6303 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
return;
6305 const Int_t kBASEMARKER=8;
6306 Double_t xp, yp, ex1, ex2, ey1, ey2;
6308 Double_t s2x, s2y, bxsize, bysize, symbolsize, xerror, sbasex, sbasey;
6309 Double_t xi1, xi2, xi3, xi4, yi1, yi2, yi3, yi4;
6318 Int_t drawmarker, errormarker;
6319 Int_t option0, option1, option2, option3, option4, optionE, optionEX0, optionI0;
6320 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};
6321 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};
6323 std::vector<Double_t> xline, yline;
6324 option0 = option1 = option2 = option3 = option4 = optionE = optionEX0 = optionI0 = 0;
6333 if (
Hoption.
Error == 16) {optionI0 = 1; option4 = 1; option3 = 1;}
6334 if (option2+option3 == 0) optionE = 1;
6349 if (errormarker == 1) symbolsize = 0.01;
6350 sbasex = sbasey = symbolsize*kBASEMARKER;
6351 if (errormarker >= 20 && errormarker <= 49) {
6352 sbasex *= cxx[errormarker-20];
6353 sbasey *= cyy[errormarker-20];
6357 fH->TAttLine::Modify();
6358 fH->TAttFill::Modify();
6359 fH->TAttMarker::Modify();
6366 npoints = last -
first +1;
6374 xline.resize(2*npoints);
6375 yline.resize(2*npoints);
6376 if ((npoints > 0) && (xline.empty() || yline.empty())) {
6377 Error(
"PaintErrors",
"too many points, out of memory");
6385 s2x =
gPad->PixeltoX(
Int_t(0.5*sbasex)) -
gPad->PixeltoX(0);
6386 s2y =-
gPad->PixeltoY(
Int_t(0.5*sbasey)) +
gPad->PixeltoY(0);
6390 bxsize =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
6391 bysize =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
6407 for (k=
first; k<=last; k++) {
6426 xminTmp +=
offset*(xmaxTmp-xminTmp);
6427 xmaxTmp = xminTmp +
w;
6428 xp = (xminTmp+xmaxTmp)/2.;
6431 if (xp <= 0)
goto L30;
6432 if (xp < logxmin)
goto L30;
6435 if (xp <
xmin)
goto L30;
6436 if (xp >
xmax)
break;
6439 if (optionI0 && yp==0)
goto L30;
6491 if (!option0 && !option3) {
6493 if (yi1 < ymin || yi1 >
ymax)
goto L30;
6496 if (!symbolsize || !errormarker) drawmarker =
kFALSE;
6500 if (yi3 >=
ymax)
goto L30;
6501 if (yi4 <=
ymin)
goto L30;
6502 gPad->PaintBox(xi1,yi3,xi2,yi4);
6517 if (optionE && drawmarker) {
6522 if (yi1<ymax && yi1>
ymin) {
6523 if (xi1 < xi3 - s2x)
gPad->PaintLine(xi1,yi1,xi3 - s2x,yi2);
6524 if (xi3 + s2x < xi2)
gPad->PaintLine(xi3 + s2x,yi1,xi2,yi2);
6528 if (optionE && !drawmarker && (ey1 != 0 || ey2 !=0)) {
6533 if (yi1<ymax && yi1>
ymin) {
6534 if (xi1 < xi3)
gPad->PaintLine(xi1,yi1,xi3,yi2);
6535 if (xi3 < xi2)
gPad->PaintLine(xi3,yi1,xi2,yi2);
6542 if (option1 && drawmarker) {
6544 if (yi3 < yi1-s2y && yi3 < ymax && yi3 >
ymin)
gPad->PaintLine(xi3 - bxsize, yi3 , xi3 + bxsize, yi3);
6545 if (yi4 > yi1+s2y && yi4 < ymax && yi4 >
ymin)
gPad->PaintLine(xi3 - bxsize, yi4 , xi3 + bxsize, yi4);
6546 if (yi1 <= ymax && yi1 >=
ymin) {
6547 if (xi1 < xi3-s2x)
gPad->PaintLine(xi1 , yi1 - bysize, xi1 , yi1 + bysize);
6548 if (xi2 > xi3+s2x)
gPad->PaintLine(xi2 , yi1 - bysize, xi2 , yi1 + bysize);
6554 if (drawmarker)
gPad->PaintPolyMarker(1, &xi3, &yi1);
6583 if (if2 > npoints) {
6584 for (i=1; i<if1; i++) {
6585 xline[if1-2+i] = xline[if2-1+i];
6586 yline[if1-2+i] = yline[if2-1+i];
6590 if (option4)
graph.PaintGraph(2*npoints,xline.data(),yline.data(),
"FC");
6591 else graph.PaintGraph(2*npoints,xline.data(),yline.data(),
"F");
6592 gPad->SetLogx(logx);
6593 gPad->SetLogy(logy);
6603 fH->TAttMarker::Modify();
6604 fH->TAttLine::Modify();
6613 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
6616 Error(
"Paint2DErrors",
"no TView in current pad");
6623 view->
SetView(phideg, thedeg, psideg, irep);
6626 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
6627 fLego->SetFillColor(
gPad->GetFrameFillColor());
6628 fLego->TAttFill::Modify();
6634 fLego->TAttFill::Modify();
6638 fLego->InitMoveScreen(-1.1,1.1);
6675 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
6718 gPad->PaintLine3D(temp1, temp2);
6725 gPad->PaintLine3D(temp1, temp2);
6732 gPad->PaintLine3D(temp1, temp2);
6736 view->
WCtoNDC(temp1, &temp2[0]);
6737 gPad->PaintPolyMarker(1, &temp2[0], &temp2[1]);
6743 fLego->InitMoveScreen(-1.1,1.1);
6745 fLego->FrontBox(90);
6770 if (frame)
gPad->GetListOfPrimitives()->Remove(frame);
6776 if (!
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode())
6797 f2->
Paint(
"surf same");
6799 obj->Paint(
"cont3 same");
6802 }
else if (obj->InheritsFrom(
TF1::Class())) {
6806 gPad->PushSelectableObject(obj);
6810 if (!
gPad->PadInHighlightMode() || (
gPad->PadInHighlightMode() && obj ==
gPad->GetSelected()))
6811 obj->Paint(lnk->GetOption());
6825 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
6828 static char chopth[17];
6830 Int_t htype, oldhtype;
6835 strlcpy(chopth,
" ",17);
6850 nbins = last -
first + 1;
6852 std::vector<Double_t> keepx, keepy;
6855 if (fixbin) keepx.resize(2);
6856 else keepx.resize(nbins+1);
6857 keepy.resize(nbins);
6863 for (j=
first; j<=last;j++) {
6873 keepy[j-
first] = yb;
6889 if (htype == 0 || htype == 1000) htype = 1001;
6911 if (!fixbin && strlen(chopth)) {
6936 graph.SetLineWidth(lw);
6939 graph.SetFillStyle(htype);
6946 graph.PaintGrapHist(nbins, keepx.data(), keepy.data() ,chopth);
6979 }
else if (strstr(opt,
"iso")) {
6982 }
else if (strstr(opt,
"tf3")) {
6986 cmd.
Form(
"TPolyMarker3D::PaintH3((TH1 *)0x%zx,\"%s\");",(
size_t)
fH,
option);
6997 view->
SetView(phideg, thedeg, psideg, irep);
7032 while (
auto obj = next()) {
7055 static const char *where =
"PaintInit";
7076 Error(where,
"cannot set X axis to log scale");
7083 TIter next(
gPad->GetListOfPrimitives());
7084 while ((obj = (
TObject *)next())) {
7095 Error(where,
"undefined user's coordinates. Cannot use option SAME");
7099 for (i=
first; i<=last; i++) {
7111 Error(where,
"cannot set X axis to log scale");
7135 Int_t nonNullErrors = 0;
7137 for (i=
first; i<=last;i++) {
7150 if (e1 > 0) nonNullErrors++;
7167 fval =
f1->
Eval(xv[0],0,0);
7179 if (!nonNullErrors) {
7198 Error(where,
"log scale requested with a negative argument (%f)", xm);
7211 if (!
Hoption.
Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)",
ymax);
7219 }
else if (
ymin < 0) {
7239 if (allchan) factor /= allchan;
7240 if (factor == 0) factor = 1;
7258 Error(where,
"Cannot set Y axis to log scale");
7304 static const char *where =
"PaintInitH";
7329 Error(where,
"cannot set Y axis to log scale");
7351 for (i=
first; i<=last;i++) {
7366 fval =
f1->
Eval(xv[0],0,0);
7388 Error(where,
"log scale requested with zero or negative argument (%f)", xm);
7396 if (!
Hoption.
Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)",
xmax);
7404 }
else if (
xmin < 0) {
7418 if (allchan) factor /= allchan;
7419 if (factor == 0) factor = 1;
7430 Error(where,
"Cannot set Y axis to log scale");
7469 Double_t wxyz[8][3] = { {-1,-1,-1}, {1,-1,-1}, {1,1,-1}, {-1,1,-1},
7470 {-1,-1, 1}, {1,-1, 1}, {1,1, 1}, {-1,1, 1} };
7471 Int_t iface[6][4] = { {0,3,2,1}, {4,5,6,7},
7472 {0,1,5,4}, {1,2,6,5}, {2,3,7,6}, {3,0,4,7} };
7486 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
7491 Error(
"PaintH3",
"no TView in current pad");
7498 view->
SetView(phideg, thedeg, psideg, irep);
7504 fLego->InitMoveScreen(-1.1,1.1);
7516 Int_t incrx = (tnorm[ 8] < 0.) ? -1 : +1;
7517 Int_t incry = (tnorm[ 9] < 0.) ? -1 : +1;
7518 Int_t incrz = (tnorm[10] < 0.) ? -1 : +1;
7533 fH->TAttFill::Modify();
7534 fH->TAttLine::Modify();
7543 Double_t pmin[3], pmax[3], sxyz[8][3];
7544 for (
Int_t ix = ix1; ix !=ix2+incrx; ix += incrx) {
7547 for (
Int_t iy = iy1; iy != iy2+incry; iy += incry) {
7550 for (
Int_t iz = iz1; iz != iz2+incrz; iz += incrz) {
7560 if (
w <
wmin)
continue;
7563 if (scale == 0)
continue;
7564 for (
Int_t i=0; i<3; ++i) {
7567 for (
Int_t k=0; k<8; ++k) {
7568 sxyz[k][i] = wxyz[k][i]*
d +
c;
7571 for (
Int_t k=0; k<8; ++k) {
7572 view->
WCtoNDC(&sxyz[k][0],&sxyz[k][0]);
7575 for (
Int_t k=0; k<6; ++k) {
7576 for (
Int_t i=0; i<4; ++i) {
7577 Int_t iv = iface[k][i];
7581 x[4] =
x[0] ;
y[4] =
y[0];
7583 x[5] =
x[2] ;
y[5] =
y[2];
7584 x[6] =
x[3] ;
y[6] =
y[3];
7585 x[7] =
x[1] ;
y[7] =
y[1];
7591 if (z <= 0.)
continue;
7596 if (k == 3 || k == 5) {
7598 }
else if (k == 0 || k == 1) {
7604 fH->TAttFill::Modify();
7605 gPad->PaintFillArea(4,
x,
y);
7606 if (iopt != 3)
gPad->PaintPolyLine(
n,
x,
y);
7636 fH->TAttFill::Modify();
7646 {-1,-1,-1}, {1,-1,-1}, {1,1,-1}, {-1,1,-1},
7647 {-1,-1, 1}, {1,-1, 1}, {1,1, 1}, {-1,1, 1}
7649 Int_t iface[6][4] = {
7650 {0,3,2,1}, {4,5,6,7},
7651 {0,1,5,4}, {1,2,6,5}, {2,3,7,6}, {3,0,4,7}
7655 {0,-1,0}, {1,0,0}, {0,1,0}, {-1,0,0}
7670 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
7675 Error(
"PaintH3",
"no TView in current pad");
7682 view->
SetView(phideg, thedeg, psideg, irep);
7689 fLego->InitMoveScreen(-1.1,1.1);
7694 fLego->InitRaster(-1.1,-1.1,1.1,1.1,1000,800);
7699 Int_t incrx = (tnorm[ 8] < 0.) ? +1 : -1;
7700 Int_t incry = (tnorm[ 9] < 0.) ? +1 : -1;
7701 Int_t incrz = (tnorm[10] < 0.) ? +1 : -1;
7710 fH->TAttLine::Modify();
7713 const Int_t NTMAX = 100;
7718 Double_t pmin[3], pmax[3], sxyz[8][3], pp[4][2];
7719 for (
Int_t ix = ix1; ix !=ix2+incrx; ix += incrx) {
7722 for (
Int_t iy = iy1; iy != iy2+incry; iy += incry) {
7725 for (
Int_t iz = iz1; iz != iz2+incrz; iz += incrz) {
7734 if (
w <
wmin)
continue;
7737 if (scale == 0)
continue;
7738 for (
Int_t i=0; i<3; ++i) {
7741 for (
Int_t k=0; k<8; ++k) {
7742 sxyz[k][i] = wxyz[k][i]*
d +
c;
7745 for (
Int_t k=0; k<8; ++k) {
7746 view->
WCtoNDC(&sxyz[k][0],&sxyz[k][0]);
7748 for (
Int_t k=0; k<6; ++k) {
7750 view->
FindNormal(normal[k][0], normal[k][1], normal[k][2], zn);
7751 if (zn <= 0)
continue;
7752 for (
Int_t i=0; i<4; ++i) {
7753 Int_t ip = iface[k][i];
7754 pp[i][0] = sxyz[ip][0];
7755 pp[i][1] = sxyz[ip][1];
7757 for (
Int_t i=0; i<4; ++i) {
7759 Int_t i2 = (i == 3) ? 0 : i + 1;
7761 fLego->FindVisibleLine(&pp[i1][0], &pp[i2][0], NTMAX, nt, &
tt[0][0]);
7762 Double_t xdel = pp[i2][0] - pp[i1][0];
7763 Double_t ydel = pp[i2][1] - pp[i1][1];
7765 for (
Int_t it = 0; it < nt; ++it) {
7766 x[0] = pp[i1][0] + xdel*
tt[it][0];
7767 y[0] = pp[i1][1] + ydel*
tt[it][0];
7768 x[1] = pp[i1][0] + xdel*
tt[it][1];
7769 y[1] = pp[i1][1] + ydel*
tt[it][1];
7770 gPad->PaintPolyLine(2,
x,
y);
7777 fLego->FindVisibleLine(&pp[i1][0], &pp[i2][0], NTMAX, nt, &
tt[0][0]);
7778 Double_t xdel = pp[i2][0] - pp[i1][0];
7779 Double_t ydel = pp[i2][1] - pp[i1][1];
7781 for (
Int_t it = 0; it < nt; ++it) {
7782 x[0] = pp[i1][0] + xdel*
tt[it][0];
7783 y[0] = pp[i1][1] + ydel*
tt[it][0];
7784 x[1] = pp[i1][0] + xdel*
tt[it][1];
7785 y[1] = pp[i1][1] + ydel*
tt[it][1];
7786 gPad->PaintPolyLine(2,
x,
y);
7790 fLego->FindVisibleLine(&pp[i1][0], &pp[i2][0], NTMAX, nt, &
tt[0][0]);
7791 xdel = pp[i2][0] - pp[i1][0];
7792 ydel = pp[i2][1] - pp[i1][1];
7793 for (
Int_t it = 0; it < nt; ++it) {
7794 x[0] = pp[i1][0] + xdel*
tt[it][0];
7795 y[0] = pp[i1][1] + ydel*
tt[it][0];
7796 x[1] = pp[i1][0] + xdel*
tt[it][1];
7797 y[1] = pp[i1][1] + ydel*
tt[it][1];
7798 gPad->PaintPolyLine(2,
x,
y);
7801 fLego->FillPolygonBorder(4, &pp[0][0]);
7842 Int_t ic2 = ic1+nbcol;
7843 Int_t ic3 = ic2+nbcol;
7853 std::vector<Double_t>
x(nx);
7854 std::vector<Double_t>
y(ny);
7855 std::vector<Double_t> z(nz);
7873 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
7877 Error(
"PaintH3Iso",
"no TView in current pad");
7883 view->
SetView(phideg, thedeg, psideg, irep);
7898 for (
Int_t col=0;col<nbcol;col++) {
7904 fLego->InitMoveScreen(-1.1,1.1);
7912 fLego->LightSource(0, ydiff, 0, 0, 0, irep);
7913 fLego->LightSource(1, yligh1, 1, 1, 1, irep);
7914 fLego->SurfaceProperty(qa, qd, qs, 1, irep);
7916 fmax = ydiff*qa + (yligh1+0.1)*(qd+qs);
7917 fLego->SetIsoSurfaceParameters(fmin, fmax, nbcol, ic1, ic2, ic3);
7919 fLego->IsoSurface(1, s, nx, ny, nz,
x.data(),
y.data(), z.data(),
"BF");
7922 fLego->InitMoveScreen(-1.1,1.1);
7924 fLego->FrontBox(90);
7954 if (deltaz == 0) deltaz = 1;
8002 Color_t colormain = -1, colordark = -1;
8013 drawShadowsInLego1 =
kFALSE;
8039 for (
Int_t id=0;
id<=nids;
id++) {
8042 if (colormain == 1) colormain = 17;
8044 else colordark = colormain;
8045 fLego->SetColorMain(colormain,
id);
8046 fLego->SetColorDark(colordark,
id);
8047 if (
id <= 1)
fLego->SetColorMain(colormain,-1);
8048 if (
id == nids)
fLego->SetColorMain(colormain,99);
8057 Error(
"PaintLego",
"no TView in current pad");
8064 view->
SetView(phideg, thedeg, psideg, irep);
8070 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
8071 fLego->SetFillColor(
gPad->GetFrameFillColor());
8072 fLego->TAttFill::Modify();
8080 fLego->TAttFill::Modify();
8084 if (raster)
fLego->InitRaster(-1.1,-1.1,1.1,1.1,1000,800);
8085 else fLego->InitMoveScreen(-1.1,1.1);
8127 fLego->LegoCartesian(90,nx,ny,
"FB");}
8139 fLego->InitMoveScreen(-1.1,1.1);
8162 Int_t ndivx, ndivy, ndivz, i;
8164 static char chopax[8], chopay[8], chopaz[8];
8165 Int_t ix1, ix2, iy1, iy2, iz1, iz2;
8170 Error(
"PaintLegoAxis",
"no TView in current pad");
8195 view->
AxisVertex(ang, av, ix1, ix2, iy1, iy2, iz1, iz2);
8196 for (i = 1; i <= 8; ++i) {
8197 r[i*3 - 3] = av[i*3 - 3] + av[i*3 - 2]*cosa;
8198 r[i*3 - 2] = av[i*3 - 2]*sina;
8199 r[i*3 - 1] = av[i*3 - 1];
8213 if (!rmin || !rmax)
return;
8216 if (
x1[0] >
x2[0]) strlcpy(chopax,
"SDH=+",8);
8217 else strlcpy(chopax,
"SDH=-",8);
8218 if (
y1[0] >
y2[0]) strlcpy(chopay,
"SDH=+",8);
8219 else strlcpy(chopay,
"SDH=-",8);
8220 if (z2[1] > z1[1]) strlcpy(chopaz,
"SDH=+",8);
8221 else strlcpy(chopaz,
"SDH=-",8);
8235 strlcat(chopax,
"N",8);
8239 strlcat(chopay,
"N",8);
8243 strlcat(chopaz,
"N",8);
8265 strlcat(chopax,
"t",8);
8283 strlcpy(chopay,
"V=+UN",8);
8298 strlcat(chopay,
"t",8);
8321 strlcat(chopaz,
"t",8);
8329 axis->
PaintAxis(z1[0], z1[1], z2[0], z2[1], bmin, bmax, ndivz, chopaz);
8346 delete palette; palette =
nullptr;
8351 delete palette; palette =
nullptr;
8379 fH->TAttMarker::Modify();
8382 Double_t dz, z, xk,xstep, yk, ystep;
8387 if (zmin == 0 && zmax == 0)
return;
8398 if (zmin == 0 && zmax == 0)
return;
8401 if (ncells > 10000) scale /= 5;
8405 if (dz >=
kNMAX || zmax < 1) {
8406 scale = (
kNMAX-1)/dz;
8407 if (ncells > 10000) scale /= 5;
8414 if (zmin >= 0) zmin = 0;
8415 else zmin -= yMARGIN*(zmax-zmin);
8417 Double_t dzmin = yMARGIN*(zmax-zmin);
8418 if (zmin >= 0 && (zmin-dzmin <= 0)) zmin = 0;
8427 strlcpy(optscat,opt.
Data(),100);
8428 char *oscat = strstr(optscat,
"scat=");
8429 char *blank = strstr(oscat,
" ");
if (blank) *blank = 0;
8430 sscanf(oscat+5,
"%lg",&scale);
8444 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
8446 if (z < zmin) z = zmin;
8447 if (z > zmax) z = zmax;
8453 if (z <= 0)
continue;
8457 for (
Int_t loop=0; loop<k; loop++) {
8458 if (k+marker >=
kNMAX) {
8462 fXbuf[marker] = (random.
Rndm()*xstep) + xk;
8463 fYbuf[marker] = (random.
Rndm()*ystep) + yk;
8472 if (
fXbuf[marker] <
gPad->GetUxmin())
break;
8473 if (
fYbuf[marker] <
gPad->GetUymin())
break;
8474 if (
fXbuf[marker] >
gPad->GetUxmax())
break;
8475 if (
fYbuf[marker] >
gPad->GetUymax())
break;
8481 if (marker > 0)
gPad->PaintPolyMarker(marker,
fXbuf.data(),
fYbuf.data());
8536 while (
auto obj = next()) {
8543 if (stats && dostat) {
8549 if (!dofit)
fit = 0;
8550 if (dofit == 1) dofit = 111;
8551 if (dostat == 1) dostat = 1111;
8552 Int_t print_name = dostat%10;
8553 Int_t print_entries = (dostat/10)%10;
8554 Int_t print_mean = (dostat/100)%10;
8555 Int_t print_stddev = (dostat/1000)%10;
8556 Int_t print_under = (dostat/10000)%10;
8557 Int_t print_over = (dostat/100000)%10;
8558 Int_t print_integral= (dostat/1000000)%10;
8559 Int_t print_skew = (dostat/10000000)%10;
8560 Int_t print_kurt = (dostat/100000000)%10;
8561 Int_t nlines = print_name + print_entries + print_mean + print_stddev +
8562 print_under + print_over + print_integral +
8563 print_skew + print_kurt;
8564 Int_t print_fval = dofit%10;
8565 Int_t print_ferrors = (dofit/10)%10;
8566 Int_t print_fchi2 = (dofit/100)%10;
8567 Int_t print_fprob = (dofit/1000)%10;
8568 Int_t nlinesf = print_fval + print_fchi2 + print_fprob;
8570 if (print_fval < 2) nlinesf +=
fit->GetNumberFreeParameters();
8571 else nlinesf +=
fit->GetNpar();
8577 if (!dostat && !
fit) {
8616 if (print_entries) {
8622 if (print_mean == 1) {
8632 if (print_mean == 1) {
8644 if (print_stddev == 1) {
8654 if (print_stddev == 1) {
8675 if (print_integral) {
8676 if (print_integral == 1) {
8686 if (print_skew == 1) {
8697 if (print_kurt == 1) {
8713 if (print_fchi2) stats->
AddText(
tt.Data());
8719 if (print_fval || print_ferrors) {
8721 for (
Int_t ipar=0;ipar<
fit->GetNpar();ipar++) {
8722 fit->GetParLimits(ipar,parmin,parmax);
8723 if (print_fval < 2 && parmin*parmax != 0 && parmin >= parmax)
continue;
8724 if (print_ferrors) {
8755 while (
auto obj = next()) {
8761 if (stats && dostat) {
8767 if (dostat == 1) dostat = 1111;
8768 Int_t print_name = dostat%10;
8769 Int_t print_entries = (dostat/10)%10;
8770 Int_t print_mean = (dostat/100)%10;
8771 Int_t print_stddev = (dostat/1000)%10;
8772 Int_t print_under = (dostat/10000)%10;
8773 Int_t print_over = (dostat/100000)%10;
8774 Int_t print_integral= (dostat/1000000)%10;
8775 Int_t print_skew = (dostat/10000000)%10;
8776 Int_t print_kurt = (dostat/100000000)%10;
8777 Int_t nlines = print_name + print_entries + 2*print_mean + 2*print_stddev + print_integral;
8778 if (print_under || print_over) nlines += 3;
8783 if (!dostat && !
fit) {
8823 if (print_entries) {
8829 if (print_mean == 1) {
8848 if (print_stddev == 1) {
8866 if (print_integral) {
8872 if (print_skew == 1) {
8891 if (print_kurt == 1) {
8909 if (print_under || print_over) {
8920 unov[0] = h2->
Integral( 0, firstX-1, lastY+1, cellsY );
8921 unov[1] = h2->
Integral(firstX , lastX , lastY+1, cellsY );
8922 unov[2] = h2->
Integral(lastX+1, cellsX , lastY+1, cellsY );
8923 unov[3] = h2->
Integral( 0, firstX-1, firstY , lastY );
8924 unov[4] = h2->
Integral(firstX , lastX , firstY , lastY );
8925 unov[5] = h2->
Integral(lastX+1, cellsX , firstY , lastY );
8926 unov[6] = h2->
Integral( 0, firstX-1, 0, firstY-1);
8927 unov[7] = h2->
Integral(firstX, lastX, 0, firstY-1);
8928 unov[8] = h2->
Integral(lastX+1, cellsX , 0, firstY-1);
8930 tt.Form(
"%g|%g|%g\n", unov[0], unov[1], unov[2]);
8932 tt.Form(
"%g|%g|%g\n", unov[3], unov[4], unov[5]);
8934 tt.Form(
"%g|%g|%g\n", unov[6], unov[7], unov[8]);
8941 tt.Form(
"#chi^{2} / ndf = %6.4g / %d",(
Float_t)
fit->GetChisquare(),ndf);
8943 for (
Int_t ipar=0;ipar<
fit->GetNpar();ipar++) {
8944 tt.Form(
"%-8s = %5.4g #pm %5.4g ",
fit->GetParName(ipar)
8968 while (
auto obj = next()) {
8974 if (stats && dostat) {
8980 if (dostat == 1) dostat = 1111;
8981 Int_t print_name = dostat%10;
8982 Int_t print_entries = (dostat/10)%10;
8983 Int_t print_mean = (dostat/100)%10;
8984 Int_t print_stddev = (dostat/1000)%10;
8985 Int_t print_under = (dostat/10000)%10;
8986 Int_t print_over = (dostat/100000)%10;
8987 Int_t print_integral= (dostat/1000000)%10;
8988 Int_t print_skew = (dostat/10000000)%10;
8989 Int_t print_kurt = (dostat/100000000)%10;
8990 Int_t nlines = print_name + print_entries + 3*print_mean + 3*print_stddev + print_integral;
8991 if (print_under || print_over) nlines += 3;
8996 if (!dostat && !
fit) {
9034 if (print_entries) {
9040 if (print_mean == 1) {
9066 if (print_stddev == 1) {
9091 if (print_integral) {
9096 if (print_skew == 1) {
9122 if (print_kurt == 1) {
9147 if (print_under || print_over) {
9155 tt.Form(
"#chi^{2} / ndf = %6.4g / %d",(
Float_t)
fit->GetChisquare(),ndf);
9157 for (
Int_t ipar=0;ipar<
fit->GetNpar();ipar++) {
9158 tt.Form(
"%-8s = %5.4g #pm %5.4g ",
fit->GetParName(ipar)
9195 if (deltaz == 0) deltaz = 1;
9262 Error(
"PaintSurface",
"no TView in current pad");
9269 view->
SetView(phideg, thedeg, psideg, irep);
9273 fLego->SetFillStyle(0);
9274 fLego->SetFillColor(1);
9276 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
9277 fLego->SetFillColor(
gPad->GetFrameFillColor());
9279 fLego->TAttFill::Modify();
9287 fLego->TAttFill::Modify();
9307 if (raster)
fLego->InitRaster(-1.1,-1.1,1.1,1.1,1000,800);
9308 else fLego->InitMoveScreen(-1.1,1.1);
9321 fLego->LightSource(0, ydiff, 0,0,0,irep);
9322 fLego->LightSource(1, yligh1 ,1,1,1,irep);
9323 fLego->SurfaceProperty(qa, qd, qs, 1, irep);
9325 fmax = fmin + (yligh1+0.1)*(qd+qs);
9330 if (!colref)
return;
9335 for (
Int_t col=0;col<nbcol;col++) {
9340 fLego->Spectrum(nbcol, fmin, fmax, icol1, 1, irep);
9382 fLego->InitMoveScreen(-1.1,1.1);
9402 fLego->InitMoveScreen(-1.1,1.1);
9429 if (!dt && !dtOld)
return;
9433 fGraph2DPainter = dt ? std::make_unique<TGraph2DPainter>(dt) : std::make_unique<TGraph2DPainter>(dtOld);
9440 Error(
"PaintTriangles",
"no TView in current pad, do not use option SAME");
9445 if (!rmin || !rmax)
return;
9461 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
9464 Error(
"PaintTriangles",
"no TView in current pad");
9471 view->
SetView(phideg, thedeg, psideg, irep);
9474 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
9475 fLego->SetFillColor(
gPad->GetFrameFillColor());
9476 fLego->TAttFill::Modify();
9482 fLego->TAttFill::Modify();
9486 fLego->InitMoveScreen(-1.1,1.1);
9497 fLego->InitMoveScreen(-1.1,1.1);
9499 fLego->FrontBox(90);
9523 Warning(
"PaintSurface",
"too many color levels, %d >= 100, reset to 99", ndivz);
9526 std::vector<Double_t> funlevel(ndivz+1);
9527 std::vector<Int_t> colorlevel(ndivz+1);
9530 for (i = 0; i < ndivz; ++i) {
9536 fLego->ColorFunction(ndivz, funlevel.data(), colorlevel.data(), irep);
9604 while (
auto obj = next()) {
9612 if (!
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode()) {
9632 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
return;
9649 while ((obj=next())) {
9651 z =
b->GetContent();
9653 poly =
b->GetPolygon();
9658 g->TAttLine::Modify();
9659 g->TAttMarker::Modify();
9660 g->TAttFill::Modify();
9663 Int_t fc =
g->GetFillColor();
9665 g->SetFillColor(
g->GetLineColor());
9667 g->SetFillStyle(
fs);
9668 g->SetFillColor(fc);
9670 if (fill)
g->Paint(
"F");
9671 if (
mark)
g->Paint(
"P");
9681 while ((
g = (
TGraph*) nextg())) {
9682 g->TAttLine::Modify();
9683 g->TAttMarker::Modify();
9684 g->TAttFill::Modify();
9687 Int_t fc =
g->GetFillColor();
9689 g->SetFillColor(
g->GetLineColor());
9691 g->SetFillStyle(
fs);
9692 g->SetFillColor(fc);
9694 if (fill)
g->Paint(
"F");
9695 if (
mark)
g->Paint(
"P");
9708 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
9711 Int_t ncolors, color, theColor;
9739 while (
auto obj = next()) {
9743 z =
b->GetContent();
9749 if (z < zmin)
continue;
9754 if (z < zc)
continue;
9756 for (
Int_t k=0; k<ndiv; k++) {
9765 color =
Int_t(0.01+(z-zmin)*scale);
9768 if (theColor > ncolors-1) theColor = ncolors-1;
9774 g->TAttFill::Modify();
9785 while ((
g = (
TGraph*) nextg())) {
9787 g->TAttFill::Modify();
9802 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
9805 Int_t k, loop, marker=0;
9806 Double_t z, xk,xstep, yk, ystep, xp, yp;
9820 scale = (
kNMAX-1)/dz;
9834 while ((obj=next())) {
9837 if (
a>maxarea) maxarea =
a;
9842 while ((obj=next())) {
9844 poly =
b->GetPolygon();
9845 z =
b->GetContent();
9846 if (z < zmin) z = zmin;
9847 if (z > zmax) z = zmax;
9853 k =
Int_t((z*scale)*(
b->GetArea()/maxarea));
9856 xstep =
b->GetXMax()-xk;
9857 ystep =
b->GetYMax()-yk;
9862 if (k <= 0 || z <= 0)
continue;
9865 if (k+marker >=
kNMAX) {
9869 xp = (random.
Rndm()*xstep) + xk;
9870 yp = (random.
Rndm()*ystep) + yk;
9871 if (
g->IsInside(xp,yp)) {
9878 if (marker > 0)
gPad->PaintPolyMarker(marker,
fXbuf.data(),
fYbuf.data());
9886 if (k <= 0 || z <= 0)
continue;
9889 if (k+marker >=
kNMAX) {
9893 xp = (random.
Rndm()*xstep) + xk;
9894 yp = (random.
Rndm()*ystep) + yk;
9902 if (marker > 0)
gPad->PaintPolyMarker(marker,
fXbuf.data(),
fYbuf.data());
9925 text.SetTextAlign(22);
9928 text.TAttText::Modify();
9935 while ((obj=next())) {
9937 p =
b->GetPolygon();
9938 x = (
b->GetXMin()+
b->GetXMax())/2;
9943 y = (
b->GetYMin()+
b->GetYMax())/2;
9948 z =
b->GetContent();
9952 tf.
Form(
"#splitline{%s%s}{#pm %s%s}",
9992 text.SetTextAlign(11);
9995 text.TAttText::Modify();
10009 if (yt == 0.)
continue;
10019 if (
y >=
gPad->GetY2())
continue;
10020 if (y <= gPad->GetY1())
continue;
10026 text.SetTextAlign(22);
10029 text.TAttText::Modify();
10048 tf.
Form(
"#splitline{%s%s}{#pm %s%s}",
10081 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
10085 Error(
"PaintTF3",
"no TView in current pad");
10091 view->
SetView(phideg, thedeg, psideg, irep);
10093 fLego->InitMoveScreen(-1.1,1.1);
10098 fLego->BackBox(90);
10108 fLego->InitMoveScreen(-1.1,1.1);
10110 fLego->FrontBox(90);
10147 TIter next(
gPad->GetListOfPrimitives());
10148 while ((obj = next())) {
10151 if (strcmp(title->
GetName(),
"title")) {title =
nullptr;
continue;}
10155 if (title)
delete title;
10170 if (ht <= 0) ht = 0.05;
10191 if (talh < 1) talh = 1;
else if (talh > 3) talh = 3;
10193 if (talv < 1) talv = 1;
else if (talv > 3) talv = 3;
10218 if(!
gPad->IsEditable())
delete ptitle;
10226 if (!strcmp(mess,
"SetF3")) {
10324 Double_t xmin_aid, ymin_aid, xmax_aid, ymax_aid;
10332 if (
xmin > xmin_aid)
xmin = xmin_aid;
10333 if (
ymin > ymin_aid)
ymin = ymin_aid;
10334 if (
xmax < xmax_aid)
xmax = xmax_aid;
10335 if (
ymax < ymax_aid)
ymax = ymax_aid;
10340 if (
xmin >xmin_aid)
xmin = xmin_aid;
10341 if (
xmax <xmax_aid)
xmax = xmax_aid;
10346 if (
ymin >ymin_aid)
ymin = ymin_aid;
10347 if (
ymax <ymax_aid)
ymax = ymax_aid;
10363 if (
xmin > xmin_aid)
xmin = xmin_aid;
10364 if (
ymin > ymin_aid)
ymin = ymin_aid;
10365 if (
xmax < xmax_aid)
xmax = xmax_aid;
10366 if (
ymax < ymax_aid)
ymax = ymax_aid;
10370 if (
xmin >xmin_aid)
xmin = xmin_aid;
10371 if (
xmax <xmax_aid)
xmax = xmax_aid;
10376 if (
ymin >ymin_aid)
ymin = ymin_aid;
10377 if (
ymax <ymax_aid)
ymax = ymax_aid;
10385 if (
xmin > xmin_aid)
xmin = xmin_aid;
10386 if (
ymin > ymin_aid)
ymin = ymin_aid;
10387 if (
xmax < xmax_aid)
xmax = xmax_aid;
10388 if (
ymax < ymax_aid)
ymax = ymax_aid;
10392 if (
xmin >xmin_aid)
xmin = xmin_aid;
10393 if (
xmax <xmax_aid)
xmax = xmax_aid;
10398 if (
ymin >ymin_aid)
ymin = ymin_aid;
10399 if (
ymax <ymax_aid)
ymax = ymax_aid;
10415 ymin - dyr*
gPad->GetBottomMargin(),
10416 xmax + dxr*
gPad->GetRightMargin(),
10427 if (
h == 0)
return;
10441 static const char *where =
"TableInit";
10469 Error(where,
"cannot set X axis to log scale");
10498 Error(where,
"cannot set Y axis to log scale");
10534 if (!
Hoption.
Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)", zmax);
10540 if (zmin >= zmax) {
10542 if (zmax > 0) zmin = 0.001*zmax;
10544 if (!
Hoption.
Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)", zmax);
10554 if (allchan) factor /= allchan;
10555 if (factor == 0) factor = 1;
10557 zmax = factor*zmax;
10558 zmin = factor*zmin;
10584 zmax += yMARGIN*(zmax-zmin);
10592 if (zmin >= 0) zmin = 0;
10593 else zmin -= yMARGIN*(zmax-zmin);
10595 Double_t dzmin = yMARGIN*(zmax-zmin);
10596 if (zmin >= 0 && (zmin-dzmin <= 0)) zmin = 0;
10597 else zmin -= dzmin;
10623 tf.
Form(
"%s%s",
"%",
f);
10627 int ie = tv.
Index(
"e");
10628 int iE = tv.
Index(
"E");
10629 int id = tv.
Index(
".");
10633 if (ie >= 0 || iE >= 0) {
10634 if (tv.
Index(
"+") >= 0) {
10636 ef.
Form(
"%s.1f",
"%");
10639 ef.
Form(
"%s.%de",
"%",ie-
id-1);
10641 ef.
Form(
"%s.%dE",
"%",iE-
id-1);
10646 ef.
Form(
"%s.%de",
"%",ie-
id-1);
10648 ef.
Form(
"%s.%dE",
"%",iE-
id-1);
10653 }
else if (
id < 0) {
10654 ef.
Form(
"%s.1f",
"%");
10674 Int_t projection = 0;
10675 if (opt.
Contains(
"x")) projection = 1;
10676 if (opt.
Contains(
"y")) projection = 2;
10677 if (opt.
Contains(
"z")) projection = 3;
10678 if (opt.
Contains(
"xy")) projection = 4;
10679 if (opt.
Contains(
"yx")) projection = 5;
10680 if (opt.
Contains(
"xz")) projection = 6;
10681 if (opt.
Contains(
"zx")) projection = 7;
10682 if (opt.
Contains(
"yz")) projection = 8;
10683 if (opt.
Contains(
"zy")) projection = 9;
10687 gROOT->MakeDefCanvas();
10699 gPad->SetDoubleBuffer(0);
10703 static int pyold1 = 0;
10704 static int pyold2 = 0;
10705 float uxmin =
gPad->GetUxmin();
10706 float uxmax =
gPad->GetUxmax();
10707 int pxmin =
gPad->XtoAbsPixel(uxmin);
10708 int pxmax =
gPad->XtoAbsPixel(uxmax);
10734 c->SetLogy(ctxt.
GetSaved()->GetLogz());
10735 c->SetLogx(ctxt.
GetSaved()->GetLogx());
10739 TH1D *hp = ((
TH2*)
fH)->ProjectionX(prjName, biny1, biny2);
10744 if (biny1 == biny2) {
10752 hp->
SetTitle(
TString::Format(
"ProjectionX of biny=%d [y=%.*lf..%.*lf]", biny1, valuePrecision, valueFrom, valuePrecision, valueTo));
10764 hp->
SetTitle(
TString::Format(
"ProjectionX of biny=[%d,%d] [y=%.*lf..%.*lf]", biny1, biny2, valuePrecision, valueFrom, valuePrecision, valueTo));
10781 gPad->SetDoubleBuffer(0);
10785 static int pxold1 = 0;
10786 static int pxold2 = 0;
10787 float uymin =
gPad->GetUymin();
10788 float uymax =
gPad->GetUymax();
10789 int pymin =
gPad->YtoAbsPixel(uymin);
10790 int pymax =
gPad->YtoAbsPixel(uymax);
10817 c->SetLogy(ctxt.
GetSaved()->GetLogz());
10818 c->SetLogx(ctxt.
GetSaved()->GetLogy());
10822 TH1D *hp = ((
TH2*)
fH)->ProjectionY(prjName, binx1, binx2);
10827 if (binx1 == binx2) {
10835 hp->
SetTitle(
TString::Format(
"ProjectionY of binx=%d [x=%.*lf..%.*lf]", binx1, valuePrecision, valueFrom, valuePrecision, valueTo));
10847 hp->
SetTitle(
TString::Format(
"ProjectionY of binx=[%d,%d] [x=%.*lf..%.*lf]", binx1, binx2, valuePrecision, valueFrom, valuePrecision, valueTo));
10874 gPad->SetDoubleBuffer(0);
10890 static TPoint endface1[5];
10891 static TPoint endface2[5];
10900 int pxmin =
gPad->XtoAbsPixel(uxmin);
10901 int pxmax =
gPad->XtoAbsPixel(uxmax);
10902 if (pxmin==pxmax)
return;
10903 int pymin =
gPad->YtoAbsPixel(uymin);
10904 int pymax =
gPad->YtoAbsPixel(uymax);
10905 if (pymin==pymax)
return;
10906 Double_t cx = (pxmax-pxmin)/(uxmax-uxmin);
10907 Double_t cy = (pymax-pymin)/(uymax-uymin);
10923 Int_t biny = firstY +
Int_t((lastY-firstY)*(px-pxmin)/(pxmax-pxmin));
10928 Int_t binz = firstZ +
Int_t((lastZ-firstZ)*(py-pymin)/(pymax-pymin));
10931 if (line1[0].GetX())
gVirtualX->DrawPolyLine(2,line1);
10932 if (nbins>1 && line1[0].GetX()) {
10943 line1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
10944 line1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
10947 line1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
10948 line1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
10955 line2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
10956 line2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
10959 line2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
10960 line2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
10966 line3[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
10967 line3[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
10970 line3[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
10971 line3[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
10977 line4[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
10978 line4[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
10981 line4[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
10982 line4[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
10984 endface1[0].
SetX(line1[0].GetX());
10985 endface1[0].
SetY(line1[0].GetY());
10986 endface1[1].
SetX(line2[0].GetX());
10987 endface1[1].
SetY(line2[0].GetY());
10988 endface1[2].
SetX(line3[0].GetX());
10989 endface1[2].
SetY(line3[0].GetY());
10990 endface1[3].
SetX(line4[0].GetX());
10991 endface1[3].
SetY(line4[0].GetY());
10992 endface1[4].
SetX(line1[0].GetX());
10993 endface1[4].
SetY(line1[0].GetY());
10995 endface2[0].
SetX(line1[1].GetX());
10996 endface2[0].
SetY(line1[1].GetY());
10997 endface2[1].
SetX(line2[1].GetX());
10998 endface2[1].
SetY(line2[1].GetY());
10999 endface2[2].
SetX(line3[1].GetX());
11000 endface2[2].
SetY(line3[1].GetY());
11001 endface2[3].
SetX(line4[1].GetX());
11002 endface2[3].
SetY(line4[1].GetY());
11003 endface2[4].
SetX(line1[1].GetX());
11004 endface2[4].
SetY(line1[1].GetY());
11038 Int_t binx = firstX +
Int_t((lastX-firstX)*(px-pxmin)/(pxmax-pxmin));
11043 Int_t binz = firstZ +
Int_t((lastZ-firstZ)*(py-pymin)/(pymax-pymin));
11046 if (line1[0].GetX())
gVirtualX->DrawPolyLine(2,line1);
11047 if (nbins>1 && line1[0].GetX()) {
11058 line1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11059 line1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11062 line1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11063 line1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11070 line2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11071 line2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11074 line2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11075 line2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11081 line3[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11082 line3[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11085 line3[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11086 line3[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11092 line4[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11093 line4[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11096 line4[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11097 line4[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11099 endface1[0].
SetX(line1[0].GetX());
11100 endface1[0].
SetY(line1[0].GetY());
11101 endface1[1].
SetX(line2[0].GetX());
11102 endface1[1].
SetY(line2[0].GetY());
11103 endface1[2].
SetX(line3[0].GetX());
11104 endface1[2].
SetY(line3[0].GetY());
11105 endface1[3].
SetX(line4[0].GetX());
11106 endface1[3].
SetY(line4[0].GetY());
11107 endface1[4].
SetX(line1[0].GetX());
11108 endface1[4].
SetY(line1[0].GetY());
11110 endface2[0].
SetX(line1[1].GetX());
11111 endface2[0].
SetY(line1[1].GetY());
11112 endface2[1].
SetX(line2[1].GetX());
11113 endface2[1].
SetY(line2[1].GetY());
11114 endface2[2].
SetX(line3[1].GetX());
11115 endface2[2].
SetY(line3[1].GetY());
11116 endface2[3].
SetX(line4[1].GetX());
11117 endface2[3].
SetY(line4[1].GetY());
11118 endface2[4].
SetX(line1[1].GetX());
11119 endface2[4].
SetY(line1[1].GetY());
11152 Int_t binx = firstX +
Int_t((lastX-firstX)*(px-pxmin)/(pxmax-pxmin));
11157 Int_t biny = firstY +
Int_t((lastY-firstY)*(py-pymin)/(pymax-pymin));
11160 if (line1[0].GetX())
gVirtualX->DrawPolyLine(2,line1);
11161 if (nbins>1 && line1[0].GetX()) {
11172 line1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11173 line1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11176 line1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11177 line1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11184 line2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11185 line2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11188 line2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11189 line2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11195 line3[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11196 line3[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11199 line3[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11200 line3[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11206 line4[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11207 line4[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11210 line4[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11211 line4[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11213 endface1[0].
SetX(line1[0].GetX());
11214 endface1[0].
SetY(line1[0].GetY());
11215 endface1[1].
SetX(line2[0].GetX());
11216 endface1[1].
SetY(line2[0].GetY());
11217 endface1[2].
SetX(line3[0].GetX());
11218 endface1[2].
SetY(line3[0].GetY());
11219 endface1[3].
SetX(line4[0].GetX());
11220 endface1[3].
SetY(line4[0].GetY());
11221 endface1[4].
SetX(line1[0].GetX());
11222 endface1[4].
SetY(line1[0].GetY());
11224 endface2[0].
SetX(line1[1].GetX());
11225 endface2[0].
SetY(line1[1].GetY());
11226 endface2[1].
SetX(line2[1].GetX());
11227 endface2[1].
SetY(line2[1].GetY());
11228 endface2[2].
SetX(line3[1].GetX());
11229 endface2[2].
SetY(line3[1].GetY());
11230 endface2[3].
SetX(line4[1].GetX());
11231 endface2[3].
SetY(line4[1].GetY());
11232 endface2[4].
SetX(line1[1].GetX());
11233 endface2[4].
SetY(line1[1].GetY());
11269 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11270 if (nbins>1 && rect2[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11275 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11276 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11277 rect1[4].
SetX(rect1[0].GetX());
11278 rect1[4].
SetY(rect1[0].GetY());
11281 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11282 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11285 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11286 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11289 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11290 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11297 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11298 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11299 rect2[4].
SetX(rect2[0].GetX());
11300 rect2[4].
SetY(rect2[0].GetY());
11303 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11304 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11307 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11308 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11311 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11312 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11340 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11341 if (nbins>1 && rect2[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11346 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11347 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11348 rect1[4].
SetX(rect1[0].GetX());
11349 rect1[4].
SetY(rect1[0].GetY());
11352 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11353 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11356 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11357 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11360 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11361 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11368 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11369 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11370 rect2[4].
SetX(rect2[0].GetX());
11371 rect2[4].
SetY(rect2[0].GetY());
11374 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11375 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11378 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11379 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11382 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11383 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11410 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11411 if (nbins>1 && rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11416 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11417 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11418 rect1[4].
SetX(rect1[0].GetX());
11419 rect1[4].
SetY(rect1[0].GetY());
11422 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11423 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11426 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11427 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11430 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11431 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11438 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11439 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11440 rect2[4].
SetX(rect2[0].GetX());
11441 rect2[4].
SetY(rect2[0].GetY());
11444 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11445 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11448 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11449 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11452 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11453 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11480 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11481 if (nbins>1 && rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11486 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11487 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11488 rect1[4].
SetX(rect1[0].GetX());
11489 rect1[4].
SetY(rect1[0].GetY());
11492 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11493 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11496 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11497 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11500 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11501 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11508 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11509 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11510 rect2[4].
SetX(rect2[0].GetX());
11511 rect2[4].
SetY(rect2[0].GetY());
11514 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11515 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11518 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11519 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11522 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11523 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11550 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11551 if (nbins>1 && rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11556 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11557 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11558 rect1[4].
SetX(rect1[0].GetX());
11559 rect1[4].
SetY(rect1[0].GetY());
11562 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11563 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11566 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11567 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11570 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11571 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11578 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11579 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11580 rect2[4].
SetX(rect2[0].GetX());
11581 rect2[4].
SetY(rect2[0].GetY());
11584 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11585 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11588 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11589 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11592 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11593 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11620 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11621 if (nbins>1 && rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11626 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11627 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11628 rect1[4].
SetX(rect1[0].GetX());
11629 rect1[4].
SetY(rect1[0].GetY());
11632 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11633 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11636 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11637 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11640 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11641 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11648 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11649 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11650 rect2[4].
SetX(rect2[0].GetX());
11651 rect2[4].
SetY(rect2[0].GetY());
11654 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11655 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11658 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11659 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11662 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11663 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
Handle_t Window_t
Window handle.
RooFitResult * fit(const char *options)
RooPlot * contour(RooRealVar &var1, RooRealVar &var2, double n1=1, double n2=2, double n3=0.0, double n4=0.0, double n5=0.0, double n6=0.0)
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.
int ParseOption(char *optin)
Parsing of the option-string.
void SetOption(CandleOption opt)
void SetHistogram(TH1D *proj)
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 (i.e.
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 from Ernst-Jan Buis.
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.
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 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.
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 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 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
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 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.
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.