184 palette.TPaletteAxis::Copy(*
this);
194 orig.TPaletteAxis::Copy(*
this);
220 if (px >= plxmin && px <= plxmax && py > plymin && py <= plymin + 30)
223 if (px > plxmax && px < plxmax + 30 && py >= plymax && py <= plymin)
267 auto &parent = *
gPad;
269 auto inter0 = parent.Interactive(
this);
275 Bool_t useBoxHandler = isHorizontal ? (py <= parent.YtoAbsPixel(
GetY1())) : (px <= parent.XtoAbsPixel(
GetX2()));
277 if (!inter && (inter0 || useBoxHandler)) {
282 parent.SetCursor(
kHand);
288 parent.Interactive(
this, inter);
295 parent.UpdateAsync();
300 if (
gROOT->IsEscaped()) {
308 if (inter->ratio1 > inter->ratio2)
309 std::swap(inter->ratio1, inter->ratio2);
310 if ((inter->ratio2 - inter->ratio1 > 0.05) &&
fH && (
fH->
GetDimension() == 2)) {
314 if (zmin <= 0 && zmax > 0)
319 Double_t newmin = zmin + (zmax - zmin) * inter->ratio1;
320 Double_t newmax = zmin + (zmax - zmin) * inter->ratio2;
332 parent.Modified(
kTRUE);
334 parent.Interactive();
351 if (
fLog == 0)
return gPad->GetLogz();
386 static char info[64];
409 snprintf(info, 64,
"(z=%g)", z);
450 if (ndivz == 0)
return 0;
452 Int_t theColor, color;
453 Double_t scale = ndivz / (wlmax - wlmin);
456 if (zc < wlmin) zc = wlmin;
458 color =
Int_t(0.01 + (zc - wlmin) * scale);
489 if ((wlmax - wlmin) <= 0) {
491 if (mz == 0) mz = 0.1;
515 Int_t theColor, color;
520 if (ztit.
Index(
";") > 0) {
529 if (ztit.
Index(
";")>0) {
535 std::unique_ptr<TLatex> label;
536 std::unique_ptr<TLine>
line;
541 label = std::make_unique<TLatex>();
548 line = std::make_unique<TLine>();
556 Double_t scale = ndivz / (wlmax - wlmin);
557 Double_t dw = (wlmax - wlmin) / ndivz;
558 for (
Int_t i = 0; i < ndivz; i++) {
561 else zc = wlmin + i*dw;
565 if (w1 < wlmin) w1 = wlmin;
570 else zc = wlmin + (i+1)*dw;
576 if (w2 <= wlmin)
continue;
588 color =
Int_t(0.01 + (w1 - wlmin) * scale);
610 if (i == 0 || (b1 - prevlab) > 1.5*lsize_user) {
621 if (i == ndivz - 1) {
623 if (
fH && (b2 - prevlab > 1.5*lsize_user)) {
647 Bool_t isOptimized = ndiv > 0;
649 Int_t maxD = absDiv / 1000000;
650 ndiv = absDiv % 100 + maxD * 1000000;
702 gPad->SetView(
nullptr);
int Int_t
Signed integer 4 bytes (int)
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char)
Option_t Option_t SetFillStyle
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmin
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t SetFillColor
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 y1
R__EXTERN TStyle * gStyle
virtual Color_t GetTitleColor() const
virtual Color_t GetLabelColor() const
virtual Int_t GetNdivisions() const
virtual Color_t GetAxisColor() const
virtual Style_t GetTitleFont() const
virtual Float_t GetLabelOffset() const
virtual Int_t GetMaxDigits() const
virtual Style_t GetLabelFont() const
virtual Float_t GetTitleSize() const
virtual Float_t GetLabelSize() const
virtual Float_t GetTickLength() const
virtual Float_t GetTitleOffset() const
virtual void Modify()
Change current fill area attributes if necessary.
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
Class to manage histogram axis.
const char * GetTitle() const override
Returns title of object.
virtual void SetRange(Int_t first=0, Int_t last=0)
Set the viewing range for the axis using bin numbers.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
static TString SavePrimitiveColor(Int_t ci)
Convert color in C++ statement which can be used in SetColor directives Produced statement either inc...
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.
virtual void SetTitle(const char *title="")
Change the title of the axis.
Float_t GetLabelOffset() const
virtual void ImportAxisAttributes(TAxis *axis)
Internal method to import TAxis attributes to this TGaxis.
Int_t GetLabelFont() const
const char * GetTitle() const override
Returns title of object.
void SetWmax(Double_t wmax)
Int_t GetLabelColor() const
Float_t GetTickSize() const
void SetWmin(Double_t wmin)
Float_t GetLabelSize() const
TH1 is the base class of all histogram classes in ROOT.
virtual Int_t GetDimension() const
@ kUserContour
User specified contour levels.
@ kIsZoomed
Bit set when zooming on Y axis.
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 void SetMaximum(Double_t maximum=-1111)
virtual void SetMinimum(Double_t minimum=-1111)
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
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.
virtual Double_t GetContourLevel(Int_t level) const
Return value of contour number level.
virtual Int_t GetMinimumBin() const
Return location of bin with minimum value in the range.
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
virtual void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
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.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
static void SavePrimitiveConstructor(std::ostream &out, TClass *cl, const char *variable_name, const char *constructor_agrs="", Bool_t empty_line=kTRUE)
Save object constructor in the output stream "out".
TPaletteAxisInteractive(Bool_t h)
void SetPosition(TVirtualPad &parent, Int_t px, Int_t py, Double_t x1, Double_t y1, Double_t x2, Double_t y2, Bool_t first=kFALSE)
void Paint(TVirtualPad &parent, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
The palette painting class.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Check if mouse on the axis region.
void Paint(Option_t *option="") override
Paint the palette.
TGaxis fAxis
Palette axis.
TPaletteAxis & operator=(const TPaletteAxis &)
Assignment operator.
~TPaletteAxis() override
Palette destructor.
char * GetObjectInfo(Int_t px, Int_t py) const override
Displays the z value corresponding to cursor position py.
TPaletteAxis()
Palette default constructor.
Int_t GetBinColor(Int_t i, Int_t j)
Returns the color index of the bin (i,j).
void Copy(TObject &palette) const override
Copy a palette to a palette.
TH1 * fH
! Pointer to parent histogram
virtual void UnZoom()
Unzoom the palette.
Int_t fLog
Log option: 0 use Logz, 1 is linear, 2 is log.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Check if mouse on the axis region.
Int_t GetLog() const
Returns whether the palette is in log scale.
Int_t GetValueColor(Double_t zc)
Returns the color index of the given z value.
A TBox with a bordersize and a shadow option.
Double_t GetY2NDC() const
virtual void ConvertNDCtoPad()
Convert pave coordinates from NDC to Pad coordinates.
Double_t GetX2NDC() const
TString GetSavePaveArgs(const char *extra_arg=nullptr, Bool_t save_option=kTRUE)
Returns arguments which should be used when saving primitive constructor Check if coordinates are ini...
void Copy(TObject &pave) const override
Copy this pave to pave.
virtual void SetName(const char *name="")
Double_t GetY1NDC() const
Double_t fY2NDC
Y2 point in NDC coordinates.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a pave.
Double_t fY1NDC
Y1 point in NDC coordinates.
Double_t GetX1NDC() const
TString & ReplaceSpecialCppChars()
Find special characters which are typically used in printf() calls and replace them by appropriate es...
const char * Data() const
TString & Remove(Ssiz_t pos)
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Int_t GetColorPalette(Int_t i) const
Return color number i in current palette.
Int_t GetNumberOfColors() const
Return number of colors in the color palette.
Helper class to store interactive parameters for individual objects Should be used via gPad->Interact...
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual Double_t AbsPixeltoX(Double_t px)=0
virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")=0
virtual Double_t AbsPixeltoY(Double_t py)=0
Double_t Exp(Double_t x)
Returns the base-e exponential function of x, which is e raised to the power 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 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.