32 , annotinsiderg_(inside)
33 { setDataRange( dr ); }
46 : sd_(start,step), stop_(st_op)
47 , annotinsiderg_(false)
48 , annotinint_(false) {}
51 : sd_(rg.start,rg.step)
53 , annotinsiderg_(false)
54 , annotinint_(false) {}
57 T findEnd(T datastop)
const;
61 template <
class T>
inline 66 template <
class T>
inline 73 T wdth = intv.
width();
77 T indic = intv.
start + wdth;
78 T indic_start = intv.
start;
80 indic = 1 - indic_start / indic;
83 sd_.start = intv.
start - 1;
85 stop_ = intv.
start + 1;
89 double scwdth = wdth < 1e-30 ? -30 : log10( (
double)wdth );
90 int tenpow = 1 - (int)scwdth;
if ( scwdth < 0 ) tenpow++;
92 scwdth = wdth * stepfac;
95 if ( scwdth < 15 ) scstep = 2.5;
96 else if ( scwdth < 30 ) scstep = 5;
97 else if ( scwdth < 50 ) scstep = 10;
100 sd_.step = (T) ( scstep / stepfac );
103 int istep =
mNINT32( sd_.step );
115 if ( annotinsiderg_ )
126 sd_.start =
mNINT32( idx0 ) * sd_.step;
128 if ( rev ) sd_.step = -sd_.step;
130 stop_ = findEnd( rev ? intv.
start : intv.
stop );
134 template <
class T>
inline 138 const bool rev = worksd.
step < 0;
143 datastop = -datastop;
146 if ( worksd.
start + 10000 * worksd.
step < datastop )
149 const double dnrsteps = double(datastop-worksd.
start)/worksd.
step - 1e-6;
153 if ( nrsteps < 1 ) nrsteps = 1;
154 T wdth = nrsteps * worksd.
step;
155 return sd_.start + (rev ? -wdth : wdth);
T step
Definition: samplingdata.h:48
SamplingData< T > sd_
Definition: axislayout.h:38
#define mIsZero(x, eps)
Definition: commondefs.h:55
AxisLayout(T start=0, T st_op=1, T step=1)
Definition: axislayout.h:44
void setDataRange(const Interval< T > &)
Definition: axislayout.h:67
Interval of values.
Definition: commontypes.h:27
T findEnd(T datastop) const
Definition: axislayout.h:135
#define mNINT32(x)
Definition: commondefs.h:48
Helps making nice axes for graphs.
Definition: axislayout.h:25
T width(bool allowrev=true) const
Definition: ranges.h:450
T start
Definition: samplingdata.h:47
Interval with step.
Definition: commontypes.h:29
void Swap(T &a, T &b)
Definition: commondefs.h:34
T stop_
Definition: axislayout.h:39
#define mDefEps
Definition: commondefs.h:60
bool annotinsiderg_
Definition: axislayout.h:41
StepInterval< T > getSampling() const
Definition: axislayout.h:62
T stop
Definition: ranges.h:91
AxisLayout(const Interval< T > &dr, bool asint=false, bool inside=false)
Definition: axislayout.h:29
AxisLayout(const StepInterval< T > &rg)
Definition: axislayout.h:50
T start
Definition: ranges.h:90
Holds the fundamental sampling info: start and interval.
Definition: samplingdata.h:20
#define mClass(module)
Definition: commondefs.h:161
iT IntPowerOf(iT i, iPOW p)
Definition: math2.h:126
bool annotinint_
Definition: axislayout.h:40