34 , annotinsiderg_(inside)
35 { setDataRange( dr ); }
48 : sd_(start,step), stop_(st_op)
49 , annotinsiderg_(false)
50 , annotinint_(false) {}
53 : sd_(rg.start,rg.step)
55 , annotinsiderg_(false)
56 , annotinint_(false) {}
59 T findEnd(T datastop)
const;
63 template <
class T>
inline 68 template <
class T>
inline 75 T wdth = intv.
width();
79 T indic = intv.
start + wdth;
80 T indic_start = intv.
start;
82 indic = 1 - indic_start / indic;
85 sd_.start = intv.
start - 1;
87 stop_ = intv.
start + 1;
91 double scwdth = wdth < 1e-30 ? -30 : log10( (
double)wdth );
92 int tenpow = 1 - (int)scwdth;
if ( scwdth < 0 ) tenpow++;
94 scwdth = wdth * stepfac;
97 if ( scwdth < 15 ) scstep = annotinint_ ? 2. : 2.5;
98 else if ( scwdth < 30 ) scstep = 5;
99 else if ( scwdth < 50 ) scstep = 10;
102 sd_.step = (T) ( scstep / stepfac );
105 int istep =
mNINT32( sd_.step );
117 if ( annotinsiderg_ )
128 sd_.start =
mNINT32( idx0 ) * sd_.step;
130 if ( rev ) sd_.step = -sd_.step;
132 stop_ = findEnd( rev ? intv.
start : intv.
stop );
136 template <
class T>
inline 140 const bool rev = worksd.
step < 0;
145 datastop = -datastop;
148 if ( worksd.
start + 10000 * worksd.
step < datastop )
151 const double dnrsteps = double(datastop-worksd.
start)/worksd.
step - 1e-6;
155 if ( nrsteps < 1 ) nrsteps = 1;
156 T wdth = nrsteps * worksd.
step;
157 return sd_.start + (rev ? -wdth : wdth);
T step
Definition: samplingdata.h:50
SamplingData< T > sd_
Definition: axislayout.h:40
#define mIsZero(x, eps)
Definition: commondefs.h:53
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
AxisLayout(T start=0, T st_op=1, T step=1)
Definition: axislayout.h:46
void setDataRange(const Interval< T > &)
Definition: axislayout.h:69
Interval of values.
Definition: commontypes.h:31
T findEnd(T datastop) const
Definition: axislayout.h:137
#define mNINT32(x)
Definition: commondefs.h:45
Helps making nice axes for graphs.
Definition: axislayout.h:27
T width(bool allowrev=true) const
Definition: ranges.h:451
T start
Definition: samplingdata.h:49
Interval with step.
Definition: commontypes.h:33
void Swap(T &a, T &b)
Definition: commondefs.h:36
T stop_
Definition: axislayout.h:41
#define mDefEps
Definition: commondefs.h:58
bool annotinsiderg_
Definition: axislayout.h:43
StepInterval< T > getSampling() const
Definition: axislayout.h:64
T stop
Definition: ranges.h:93
AxisLayout(const Interval< T > &dr, bool asint=false, bool inside=false)
Definition: axislayout.h:31
AxisLayout(const StepInterval< T > &rg)
Definition: axislayout.h:52
T start
Definition: ranges.h:92
Holds the fundamental sampling info: start and interval.
Definition: samplingdata.h:22
#define mClass(module)
Definition: commondefs.h:164
iT IntPowerOf(iT i, iPOW p)
Definition: math2.h:122
bool annotinint_
Definition: axislayout.h:42