187 if (px > plxmax && px < plxmax + 30 && py >= plymax && py <= plymin)
return px - plxmax;
201 static Int_t kmode = 0;
204 if (kmode != 0 || px <= plxmax) {
221 static Int_t px1old, py1old, px2old, py2old;
244 if (
gROOT->IsEscaped()) {
260 if (ratio2 - ratio1 > 0.05) {
264 if (
gPad->GetLogz()) {
270 Double_t newmin = zmin + (zmax - zmin) * ratio1;
271 Double_t newmax = zmin + (zmax - zmin) * ratio2;
274 if (
gPad->GetLogz()) {
321 static char info[64];
329 if (
gPad->GetLogz()) {
369 if (
gPad->GetLogz()) {
378 if (ndivz == 0)
return 0;
380 Int_t theColor, color;
381 Double_t scale = ndivz / (wlmax - wlmin);
384 if (zc < wlmin) zc = wlmin;
386 color =
Int_t(0.01 + (zc - wlmin) * scale);
410 Bool_t kHorizontal =
false;
412 if ((wlmax - wlmin) <= 0) {
414 if (mz == 0) mz = 0.1;
423 if (
gPad->GetLogz()) {
431 if (ndivz == 0)
return;
433 Int_t theColor, color;
452 Double_t scale = ndivz / (wlmax - wlmin);
453 for (
Int_t i = 0; i < ndivz; i++) {
459 if (w1 < wlmin) w1 = wlmin;
469 if (w2 <= wlmin)
continue;
481 color =
Int_t(0.01 + (w1 - wlmin) * scale);
501 if (i == 0 || (b1 - prevlab) > 1.5*lsize_user) {
510 if ((b2 - prevlab > 1.5*lsize_user)) {
522 Bool_t isOptimized = ndiv>0;
523 Int_t absDiv = abs(ndiv);
524 Int_t maxD = absDiv/1000000;
525 ndiv = absDiv%100 + maxD*1000000;
526 if (!isOptimized) ndiv = -ndiv;
528 char chopt[6] =
"S ";
530 strncat(chopt,
"+L", 3);
533 strncat(chopt,
"N", 2);
535 if (
gPad->GetLogz()) {
538 strncat(chopt,
"G", 2);
558 out <<
" " << std::endl;
559 if (
gROOT->ClassSaved(TPaletteAxis::Class())) {
566 <<
"," <<
fH->
GetName() <<
");" << std::endl;
569 <<
"," <<
fH->
GetName() <<
");" << std::endl;
static const double x2[5]
static const double x1[5]
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
virtual Int_t GetNdivisions() const
virtual void Modify()
Change current fill area attributes if necessary.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
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.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
Class to manage histogram axis.
virtual void SetRange(Int_t first=0, Int_t last=0)
Set the viewing range for the axis using bin numbers.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Double_t fX1
X of 1st point.
Double_t fY2
Y of 2nd point.
Double_t fX2
X of 2nd point.
Double_t fY1
Y of 1st point.
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.
Float_t GetLabelOffset() const
virtual void ImportAxisAttributes(TAxis *axis)
Internal method to import TAxis attributes to this TGaxis.
Int_t GetLabelFont() const
Float_t GetTitleOffset() const
Float_t GetTitleSize() const
Int_t GetLabelColor() const
Float_t GetTickSize() const
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 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 Int_t GetContour(Double_t *levels=0)
Return contour values into array levels if pointer levels is non zero.
To draw Mathematical Formula.
virtual void PaintLatex(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text)
Main drawing function.
Use the TLine constructor to create a simple line.
virtual void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
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.
The palette painting class.
void Copy(TObject &palette) const
Copy a palette to a palette.
virtual ~TPaletteAxis()
Palette destructor.
TGaxis fAxis
Palette axis.
TPaletteAxis & operator=(const TPaletteAxis &)
Assignment operator.
TPaletteAxis()
Palette default constructor.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Check if mouse on the axis region.
Int_t GetBinColor(Int_t i, Int_t j)
Returns the color index of the bin (i,j).
TH1 * fH
! Pointer to parent histogram
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Check if mouse on the axis region.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
virtual void Paint(Option_t *option="")
Paint the palette.
virtual void UnZoom()
Unzoom the palette.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Displays the z value corresponding to cursor position py.
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
virtual void SetName(const char *name="")
Double_t fX2NDC
X2 point in NDC coordinates.
Double_t GetY1NDC() const
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a pave.
TString fOption
Pave style.
Double_t fY2NDC
Y2 point in NDC coordinates.
void Copy(TObject &pave) const
Copy this pave to pave.
Double_t fX1NDC
X1 point in NDC coordinates.
Double_t fY1NDC
Y1 point in NDC coordinates.
Double_t GetX1NDC() const
Bool_t Contains(const char *pat, 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.
virtual void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep)=0
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Short_t Min(Short_t a, Short_t b)
Double_t Log10(Double_t x)