16 #ifndef ROOT7_TPadUserAxis 17 #define ROOT7_TPadUserAxis 25 namespace Experimental {
61 fBoundsKind(boundKind), fBegin(bound), fEnd(bound) {}
73 return std::max(std::numeric_limits<double>::min(), fEnd - fBegin);
74 return std::min(-std::numeric_limits<double>::min(), fEnd - fBegin);
106 bool fLogScale =
false;
virtual TPadLength::Normal ToNormal(const TPadLength::User &) const =0
Convert user coordinates to normal coordinates.
virtual ~TPadUserAxisBase()
A normalized coordinate: 0 in the left, bottom corner, 1 in the top, right corner of the TPad...
the axis minimum and maximum are to be respected by the painter
Namespace for new ROOT classes and functions.
TPadCartesianUserAxis(double begin, double end)
Construct a cartesian axis from min and max, setting fBoundsKind to kAxisBoundsMinMax.
no defined axis range; the painter will decide
bool RespectBegin() const
the axis begin is to be respected by the painter.
void SetBegin(double begin)
double GetSensibleDenominator() const
For (pos-min)/(max-min) calculations, return a sensible, div-by-0 protected denominator.
void SetBound(EAxisBoundsKind boundKind, double bound)
the axis end is to be respected by the painter.
double fBegin
Begin of the axis range (but see fBoundsKind)
EAxisBoundsKind GetBoundsKind() const
A user coordinate, as defined by the EUserCoordSystem parameter of the TPad.
TPadCartesianUserAxis(EAxisBoundsKind boundKind, double bound)
Construct a cartesian axis with min or max, depending on the boundKind parameter. ...
TPadUserAxisBase(double begin, double end)
Construct a cartesian axis from min and max, setting fBoundsKind to kAxisBoundsMinMax.
double fEnd
End of the axis range (but see fBoundsKind)
void SetBounds(double begin, double end)
EAxisBoundsKind
Types of axis bounds to respect by the painter.
TPadUserAxisBase & operator=(const TPadUserAxisBase &)=default
Disable spliced assignment.
TPadUserAxisBase(EAxisBoundsKind boundKind, double bound)
Construct a cartesian axis with min or max, depending on the boundKind parameter. ...
TPadUserAxisBase()=default
Allow derived classes to default construct a TPadUserAxisBase.
int fBoundsKind
Axis bounds to be used by the painter.
void SetLogScale(bool logScale=true)