#include <plot.h>
A map from values to screen-space.
Individual grid/ticks can be added with .major()/.minor()/.tick().
Multiple grids/ticks can be added using .majors()/.minors()/.ticks(), which accept a variable number of values:
Methods | |
| double | drawMin () const |
| double | drawMax () const |
| double | drawSize () const |
| Axis (double drawLow, double drawHigh) | |
| Axis (const Axis &other)=default | |
| void | autoValue (double v) |
| Register a value for the auto-scale. | |
| void | autoSetup () |
| Axis & | blank (bool includeLinked=false) |
| Prevent auto-labelling. | |
| Axis & | blankLabels (bool includeLinked=false) |
| Clear the names from any existing labels. | |
| Axis & | copyFrom (Axis &other, bool clearLabels=false) |
| Copy ticks/label from another axis, optionally removing their text. | |
| Axis & | linkFrom (Axis &other) |
| Link this axis to another, copying any ticks/labels set later as well. | |
| Axis & | flip (bool flip=true) |
| Axis & | label (std::string l, PlotStyle::Counter index=-1) |
| Sets the label, and optionally style to match a particular line. | |
| const std::string & | label () const |
| Axis & | range (std::function< double(double)> valueToUnit) |
| Axis & | range (double map(double)) |
| Axis & | range (std::function< double(double)> map, double lowValue, double highValue) |
| Axis & | range (double map(double), double lowValue, double highValue) |
| Axis & | linear (double low, double high) |
| double | map (double v) |
| template<class ... Args> | |
| Axis & | major (Args &&...args) |
| template<class ... Args> | |
| Axis & | minor (Args &&...args) |
| template<class ... Args> | |
| Axis & | tick (Args &&...args) |
| Axis & | majors () |
| template<class ... Args> | |
| Axis & | majors (Tick tick, Args ...args) |
| Axis & | minors () |
| template<class ... Args> | |
| Axis & | minors (Tick tick, Args ...args) |
| Axis & | ticks () |
| template<class ... Args> | |
| Axis & | ticks (Tick t, Args ...args) |
Attributes | |
| double | drawLow |
| double | drawHigh |
| PlotStyle::Counter | styleIndex = -1 |
| Not associated with a particular line by default, but can be. | |
| bool | flipped = false |
| Whether the axis should draw on the non-default side (e.g. right/top) | |
| std::vector< Tick > | tickList |
|
inline |
Register a value for the auto-scale.
|
inline |
Prevent auto-labelling.
|
inline |
Clear the names from any existing labels.
Copy ticks/label from another axis, optionally removing their text.
|
inline |
Sets the label, and optionally style to match a particular line.
Link this axis to another, copying any ticks/labels set later as well.
| bool signalsmith::plot::Axis::flipped = false |
Whether the axis should draw on the non-default side (e.g. right/top)
| PlotStyle::Counter signalsmith::plot::Axis::styleIndex = -1 |
Not associated with a particular line by default, but can be.