767 Error(
"TGaxis",
"calling constructor with an unknown function: %s",
funcname);
801 fGridLength(
ax.fGridLength),
802 fTickSize(
ax.fTickSize),
803 fLabelOffset(
ax.fLabelOffset),
804 fLabelSize(
ax.fLabelSize),
805 fTitleOffset(
ax.fTitleOffset),
806 fTitleSize(
ax.fTitleSize),
808 fLabelColor(
ax.fLabelColor),
809 fLabelFont(
ax.fLabelFont),
810 fNModLabs(
ax.fNModLabs),
814 fTimeFormat(
ax.fTimeFormat),
815 fFunctionName(
ax.fFunctionName),
816 fFunction(
ax.fFunction),
819 if (
ax.IsOwnedModLabs())
833 TAttText::operator=(
ax);
1014 const char *
where =
"PaintAxis";
1154 Error(
where,
"Invalid number of divisions: %d",ndiv);
1214 Error(
where,
"Time offset has not the right format");
1232 if (
range>31536000) {
1249 n2a = (ndiv%10000 -
n1a)/100;
1282 if (binLow !=
Double_t(
int(binLow)) || binWidth !=
Double_t(
int(binWidth))) {
1286 if ((
wmin-binLow) > epsilon) { binLow += binWidth; nbins--; }
1287 if ((binHigh-
wmax) > epsilon) { binHigh -= binWidth; nbins--; }
1376 if (!
gPad->IsBatch()) {
1492 if (ndiv == 0)
return;
1587 if (!
gPad->IsBatch()) {
1621 }
else if (
y0 ==
y1) {
1651 for (k=0;k<
nticks; k++) {
1826 if ((
wmin ==
wmax) || (ndiv == 0)) {
1896 if (
nexe%3 == 0 && ww >=
rne)
break;
1982 if (label[first] ==
'.') {
1986 first = 1; last =
strlen(label);
1988 if (label[first] ==
'-' && label[first+1] ==
'.') {
1992 first = 1; last =
strlen(label);
2000 while (label[last] ==
'0') { label[last] = 0; last--;}
2004 if (label[last] ==
'.') {
2005 if (!
optionDot) { label[last] = 0; last--;}
2009 if (last-first == 1 && label[first] ==
'-'
2010 && label[last] ==
'0') {
2038 while (label[
tmplast] ==
'0') {
2051 strncpy(label,
"invalid", 256);
2054 first = 0; last=
strlen(label)-1;
2169 if ((
wmin ==
wmax) || (ndiv == 0)) {
2188 if (h2 > 0) h2 += 1.E-6;
2212 if ((
xone-x11)>epsilon)
break;
2249 while (last > first) {
2250 if (label[last] !=
'0')
break;
2254 if (label[last] ==
'.') {label[last] = 0; last--;}
2275 if (
n1a == 0)
return;
2312 for (k=2;k<10;k++) {
2431 Int_t dummy = 0;
if (dummy) { }
2503 if (binWidth <= 1) { binWidth = 1; binLow =
int(
A1); }
2507 binLow =
int(
A1/binWidth)*binWidth;
2523 while (
xb <= binHigh) {
2527 binHigh =
xb - binWidth;
2536 for (
Int_t i=0; i<=last; i++) {
2537 if (
strchr(
"1234567890-+.", label[i]) ) { first = i;
return; }
2539 Error(
"LabelsLimits",
"attempt to draw a blank label");
2563 out<<
"gaxis = new TGaxis("<<
fX1<<
","<<
fY1<<
","<<
fX2<<
","<<
fY2
2565 out<<
" gaxis->SetLabelOffset("<<
GetLabelOffset()<<
");"<<std::endl;
2566 out<<
" gaxis->SetLabelSize("<<
GetLabelSize()<<
");"<<std::endl;
2567 out<<
" gaxis->SetTickSize("<<
GetTickSize()<<
");"<<std::endl;
2568 out<<
" gaxis->SetGridLength("<<
GetGridLength()<<
");"<<std::endl;
2569 out<<
" gaxis->SetTitleOffset("<<
GetTitleOffset()<<
");"<<std::endl;
2570 out<<
" gaxis->SetTitleSize("<<
GetTitleSize()<<
");"<<std::endl;
2571 out<<
" gaxis->SetTitleColor("<<
GetTextColor()<<
");"<<std::endl;
2572 out<<
" gaxis->SetTitleFont("<<
GetTextFont()<<
");"<<std::endl;
2583 out<<
" gaxis->SetLabelColor(ci);" << std::endl;
2585 out<<
" gaxis->SetLabelColor("<<
GetLabelColor()<<
");"<<std::endl;
2589 out<<
" gaxis->SetLineColor(ci);" << std::endl;
2591 out<<
" gaxis->SetLineColor("<<
GetLineColor()<<
");"<<std::endl;
2594 out<<
" gaxis->SetLineStyle("<<
GetLineStyle()<<
");"<<std::endl;
2597 out<<
" gaxis->SetLineWidth("<<
GetLineWidth()<<
");"<<std::endl;
2600 out<<
" gaxis->SetLabelFont("<<
GetLabelFont()<<
");"<<std::endl;
2603 out<<
" gaxis->SetMoreLogLabels();"<<std::endl;
2606 out<<
" gaxis->SetNoExponent();"<<std::endl;
2611 if (
ml->GetLabNum() == 0)
2612 out<<
" gaxis->ChangeLabelByValue("<<
ml->GetLabValue()<<
",";
2614 out<<
" gaxis->ChangeLabel("<<
ml->GetLabNum()<<
",";
2615 out<<
ml->GetAngle()<<
","
2616 <<
ml->GetSize()<<
","
2617 <<
ml->GetAlign()<<
","
2618 <<
ml->GetColor()<<
","
2619 <<
ml->GetFont()<<
","
2624 out<<
" gaxis->Draw();"<<std::endl;
2670 if (
ml->GetLabNum() == 0) {
2673 }
else if (
indx != 0) {
2675 if (!match && (
ml->GetLabNum() < 0) && (
indx > 0) && (
numlabels > 0)) {
2677 Error(
"FindModLab",
"reverse numbering in ChangeLabel doesn't work when more log labels are requested");
2683 if (match)
return ml;
2871 if (!
ml->GetText().IsNull())
strlcpy(
c,
ml->GetText().Data(), 256);
3045 if (
R__b.IsReading()) {
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 SetLineColor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
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 Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t SetTextFont
Option_t Option_t TPoint TPoint angle
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 char Point_t Rectangle_t wmax
Option_t Option_t TPoint TPoint const char y1
static TAttText SavedAttText
Global variable saving the current label's text angle. Used by TGaxis::ChangeLabelAttributes.
R__EXTERN TStyle * gStyle
Draw all kinds of Arrows.
virtual Color_t GetTitleColor() const
virtual Color_t GetLabelColor() const
virtual Color_t GetAxisColor() const
virtual Style_t GetTitleFont() const
virtual Float_t GetLabelOffset() 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 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.
Width_t fLineWidth
Line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
Style_t fLineStyle
Line style.
Color_t fLineColor
Line color.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual Font_t GetTextFont() const
Return the text font.
Color_t fTextColor
Text color.
Float_t fTextAngle
Text angle.
virtual Color_t GetTextColor() const
Return the text color.
virtual void Streamer(TBuffer &)
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
virtual Float_t GetTextAngle() const
Return 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.
Font_t fTextFont
Text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Short_t fTextAlign
Text alignment.
Float_t fTextSize
Text size.
TAxis helper class used to store the modified labels.
Class to manage histogram axis.
const char * GetTitle() const override
Returns title of object.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
@ kCenterLabels
Bit 13 is used by TObject.
const char * GetBinLabel(Int_t bin) const
Return label for bin.
Bool_t GetDecimals() const
Int_t GetLast() const
Return last bin on the axis i.e.
TList * GetModifiedLabels() const
virtual const char * GetTimeFormat() const
Int_t GetFirst() const
Return first bin on the axis i.e.
THashList * GetLabels() const
Buffer base class used for serializing objects.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
static Bool_t SaveColor(std::ostream &out, Int_t ci)
Save a color with index > 228 as a C++ statement(s) on output stream out.
virtual Double_t GetXmax() const
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
virtual Double_t GetXmin() const
virtual void SetNoExponent(Bool_t noExponent=kTRUE)
Set the NoExponent flag.
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.
TGaxis()
TGaxis default constructor.
void SetTitleOffset(Float_t titleoffset=1)
void ChangeLabelAttributes(Int_t i, Int_t nlabels, TLatex *t, char *c, Double_t value=0., Double_t eps=-1.)
Helper method used by TGaxis::ChangeLabel.
Float_t fTitleSize
Size of title in NDC.
Float_t GetGridLength() const
void SetLabelFont(Int_t labelfont)
void SetTitleSize(Float_t titlesize)
void Streamer(TBuffer &) override
Stream an object of class TGaxis.
Float_t fTitleOffset
Offset of title wrt axis.
TString fTitle
Axis title.
Int_t fLabelFont
Font for labels.
TAxisModLab * FindModLab(Int_t indx, Int_t numlabels=0, Double_t v=0., Double_t eps=-1.) const
Search for axis modifier by index or value.
virtual void SetTitle(const char *title="")
Change the title of the axis.
Int_t fLabelColor
Color for labels.
TAxis * fAxis
! Pointer to original TAxis axis (if any)
TString fTimeFormat
Time format, ex: 09/12/99 12:34:00.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
TString fFunctionName
Name of mapping function pointed by fFunction.
void SetLabelOffset(Float_t labeloffset)
virtual void Rotate(Double_t X, Double_t Y, Double_t CFI, Double_t SFI, Double_t XT, Double_t YT, Double_t &U, Double_t &V)
Internal method to rotate axis coordinates.
Float_t GetLabelOffset() const
void SetTimeOffset(Double_t toffset, Option_t *option="local")
Change the time offset. If option = "gmt", set display mode to GMT.
Float_t fTickSize
Size of primary tick mark in NDC.
void ChangeLabelByValue(Double_t labValue, Double_t labAngle=-1., Double_t labSize=-1., Int_t labAlign=-1, Int_t labColor=-1, Int_t labFont=-1, const TString &labText="")
Define new text attributes for the label value "labValue".
~TGaxis() override
TGaxis default destructor.
virtual void ImportAxisAttributes(TAxis *axis)
Internal method to import TAxis attributes to this TGaxis.
Int_t GetLabelFont() const
Float_t fLabelOffset
Offset of label wrt axis.
static void SetMaxDigits(Int_t maxd=5)
Static function to set fgMaxDigits for axis.
Float_t fLabelSize
Size of labels in NDC.
Int_t fNdiv
Number of divisions.
const char * GetTitle() const override
Returns title of object.
TString fChopt
Axis options.
TGaxis & operator=(const TGaxis &)
Assignment operator.
Float_t GetTitleOffset() const
TF1 * fFunction
! Pointer to function computing axis values
Float_t GetTitleSize() const
static Int_t GetMaxDigits()
Static function returning gStyle->GetAxisMaxDigits().
virtual void CenterLabels(Bool_t center=kTRUE)
If center = kTRUE axis labels are centered in the center of the bin.
const char * GetName() const override
Returns name of object.
void SetLabelColor(Int_t labelcolor)
virtual void AdjustBinSize(Double_t A1, Double_t A2, Int_t nold, Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BinWidth)
Internal method for axis labels optimisation.
Float_t fGridLength
Length of the grid in NDC.
Int_t GetLabelColor() const
virtual void SetDecimals(Bool_t dot=kTRUE)
Set the decimals flag.
virtual void CenterTitle(Bool_t center=kTRUE)
If center = kTRUE axis title will be centered. The default is right adjusted.
TList * fModLabs
List of modified labels.
void ChangeLabel(Int_t labNum=0, Double_t labAngle=-1., Double_t labSize=-1., Int_t labAlign=-1, Int_t labColor=-1, Int_t labFont=-1, const TString &labText="")
Define new text attributes for the label number "labNum".
void CleanupModLabs()
Correctly cleanup fModLabs - delete content when owned by TGaxis.
Double_t fWmax
Highest value on the axis.
Float_t GetTickSize() const
virtual TGaxis * DrawAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t wmin, Double_t wmax, Int_t ndiv=510, Option_t *chopt="", Double_t gridlength=0)
Draw this axis with new attributes.
virtual void SetMoreLogLabels(Bool_t more=kTRUE)
Set the kMoreLogLabels bit flag.
void SetTickSize(Float_t ticksize)
void Paint(Option_t *chopt="") override
Draw this axis with its current attributes.
Int_t fNModLabs
Number of modified labels.
Double_t fWmin
Lowest value on the axis.
void SetLabelSize(Float_t labelsize)
void SetFunction(const char *funcname="")
Specify a function to map the axis values.
virtual void SetName(const char *name)
Change the name of the axis.
static void SetExponentOffset(Float_t xoff=0., Float_t yoff=0., Option_t *axis="xy")
Static method to set X and Y offset of the axis 10^n notation.
void LabelsLimits(const char *label, Int_t &first, Int_t &last)
Internal method to find first and last character of a label.
Bool_t IsOwnedModLabs() const
Returns kTRUE when fModLabs owned by TGaxis and should be cleaned up.
void ResetLabelAttributes(TLatex *t)
Helper method used by TGaxis::ChangeLabel.
Float_t GetLabelSize() const
void SetOption(Option_t *option="")
To set axis options.
TClass * IsA() const override
static void Optimize(Double_t A1, Double_t A2, Int_t nold, Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="")
Static function to compute reasonable axis limits.
To draw Mathematical Formula.
Use the TLine constructor to create a simple line.
Double_t fY1
Y of 1st point.
Double_t fX1
X of 1st point.
Double_t fX2
X of 2nd point.
TLine & operator=(const TLine &src)
Assignment operator.
Double_t fY2
Y of 2nd point.
virtual void PaintLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2)
Draw this line with new coordinates in NDC.
void Streamer(TBuffer &) override
Stream an object of class TLine.
void Add(TObject *obj) override
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
const char * GetName() const override
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
@ kCanDelete
if object in a list can be deleted
void ToLower()
Change string to lower-case.
const char * Data() const
TString & Remove(Ssiz_t pos)
virtual void Streamer(TBuffer &)
Stream a string object.
TString & Append(const char *cs)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Double_t GetTimeOffset() const
Int_t GetAxisMaxDigits() const
Method returns maximum number of digits permitted for the axis labels above which the notation with 1...
Color_t GetGridColor() const
Style_t GetGridStyle() const
void SetExponentOffset(Float_t xoff=0., Float_t yoff=0., Option_t *axis="XY")
Method set X and Y offset of the axis 10^n notation.
Float_t GetTitleOffset(Option_t *axis="X") const
Return title offset.
void SetAxisMaxDigits(Int_t maxd=5)
Method set maximum number of digits permitted for the axis labels above which the notation with 10^N ...
Width_t GetGridWidth() const
Int_t GetStripDecimals() const
void GetExponentOffset(Float_t &xoff, Float_t &yoff, Option_t *axis="X") const
Method returns X and Y offset of the axis 10^n notation.
static time_t MktimeFromUTC(tm_t *tmstruct)
Equivalent of standard routine "mktime" but using the assumption that tm struct is filled with UTC,...
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t ATan2(Double_t y, Double_t x)
Returns the principal value of the arc tangent of y/x, expressed in radians.
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.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
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.