Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
correlation::plotters::detail::NiceScale Struct Reference

#include <PlotTypes.hpp>

Public Member Functions

 NiceScale ()=default
 NiceScale (const DataRange &range, int max_ticks=6, bool strict_bounds=false, real_t custom_step=static_cast< real_t >(0.0))

Public Attributes

real_t min = static_cast<real_t>(0.0)
 Starting tick value.
real_t max = static_cast<real_t>(0.0)
 Ending tick value.
real_t spacing = static_cast<real_t>(0.0)
 Calculated distance between ticks.
std::vector< real_t > ticks
 Generated tick locations.

Static Private Member Functions

static real_t niceNum (real_t range, bool round)
 Rounds a range value to a "nice" human-readable number.

Constructor & Destructor Documentation

◆ NiceScale() [1/2]

correlation::plotters::detail::NiceScale::NiceScale ( )
default

◆ NiceScale() [2/2]

correlation::plotters::detail::NiceScale::NiceScale ( const DataRange & range,
int max_ticks = 6,
bool strict_bounds = false,
real_t custom_step = static_cast<real_t>(0.0) )
inlineexplicit
Here is the call graph for this function:

Member Function Documentation

◆ niceNum()

real_t correlation::plotters::detail::NiceScale::niceNum ( real_t range,
bool round )
inlinestaticprivate

Rounds a range value to a "nice" human-readable number.

Parameters
rangeThe value range for the axis.
roundWhether to perform aggressive rounding.
Returns
The rounded "nice" value.
Here is the caller graph for this function:

Member Data Documentation

◆ max

real_t correlation::plotters::detail::NiceScale::max = static_cast<real_t>(0.0)

Ending tick value.

◆ min

real_t correlation::plotters::detail::NiceScale::min = static_cast<real_t>(0.0)

Starting tick value.

◆ spacing

real_t correlation::plotters::detail::NiceScale::spacing = static_cast<real_t>(0.0)

Calculated distance between ticks.

◆ ticks

std::vector<real_t> correlation::plotters::detail::NiceScale::ticks

Generated tick locations.


The documentation for this struct was generated from the following file: