|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_UTILS_TOOLS_TICKMARKS_H_
2 #define GENESIS_UTILS_TOOLS_TICKMARKS_H_
91 static double step_size(
double interval_size,
size_t target_steps );
99 std::vector<double>
linear_ticks(
double min,
double max,
size_t target_steps );
109 std::vector<LabeledTick>
linear_labels(
double min,
double max,
size_t target_steps );
125 std::vector<LabeledTick>
logarithmic_labels(
double min,
double max,
double base = 10.0 );
165 #endif // include guard
std::vector< LabeledTick > linear_labels(double min, double max, size_t target_steps)
Return a set of labels with relative positions between min and max, where the labels correspond to th...
bool undershoot_at_min
Should the lowest value in the resulting list of ticks be below the provided min value (true) or not ...
Helper class to find "nice" tickmark intervals for creating scales and axes.
std::vector< double > linear_ticks(double min, double max, size_t target_steps)
Calculate a set of ticks that linearily span from min to max in approximately target_steps many steps...
std::vector< LabeledTick > logarithmic_labels(double min, double max, double base=10.0)
Return a set of labels with relative positions between min and max, where the labels correspond to lo...
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
bool include_min
Should the provided min value be included in the resulting list of ticks or not.
double relative_epsilon
Relative epsilon used to exclude two tickmarks that are too close to each other.
bool overshoot_at_max
Should the highest value in the resulting list of ticks be above the provided max value (true) or not...
LabeledTick(double rel_pos, double lab)
Tickmarks & operator=(Tickmarks const &)=default
bool include_max
Should the provided max value be included in the resulting list of ticks or not.
static double step_size(double interval_size, size_t target_steps)
Calculate a step size that fills the interval_size in approximately target_steps many steps.