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