MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / getTickStep

Method getTickStep

qcustomplot/qcustomplot.cpp:5594–5598  ·  view source on GitHub ↗

! \internal Takes the entire currently visible axis range and returns a sensible tick step in order to provide readable tick labels as well as a reasonable number of tick counts (see \ref setTickCount, \ref setTickStepStrategy). If a QCPAxisTicker subclass only wants a different tick step behaviour than the default implementation, it should reimplement this method. See \ref cleanMa

Source from the content-addressed store, hash-verified

5592 function.
5593*/
5594double QCPAxisTicker::getTickStep(const QCPRange &range)
5595{
5596 double exactStep = range.size()/(double)(mTickCount+1e-10); // mTickCount ticks on average, the small addition is to prevent jitter on exact integers
5597 return cleanMantissa(exactStep);
5598}
5599
5600/*! \internal
5601

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected