Class Axis

Class Documentation

class Axis

Axis class for use in layout of plots.

Serialises to something like:

"xaxis": {"title": "x1"}

Public Functions

Axis(const AxisDirection dir)
void setDirection(AxisDirection dir)

Sets the direction of the axis, as X, Y, or Z.

Parameters
  • dir: Axis direction (an enum X, Y or Z)

void setTitle(std::string label)
void setLog()
AxisDirection getDirection()
std::string getTitle()
bool isLog()

Protected Attributes

AxisDirection direction
std::string title
std::string key
bool is_log = false

Friends

void to_json(nlohmann::json &j, const Axis &p)

Serialise axis into a valid json string.

Produces json like:

"xaxis": {"title": "x1"}