Skip to main content

CorePlotting::AxisMapping

CorePlotting::AxisMapping

Describes how one axis maps between world (rendering) coordinates and domain (semantically meaningful) values, plus how to format labels. More…

#include <AxisMapping.hpp>

Public Functions

Name
std::string label(double world) const
Shorthand: world → domain → label.
bool isValid() const
Check whether all required functions are set.

Public Attributes

Name
std::function< double(double world)> worldToDomain
Convert world coordinate → domain value (e.g., world_y 0.5 → trial 37).
std::function< double(double domain)> domainToWorld
Convert domain value → world coordinate (inverse of worldToDomain).
std::function< std::string(double domain)> formatLabel
Format a domain value as a display string (e.g., 37.0 → “Trial 37”).
std::string title
Optional axis title (e.g., “Trial”, “Time (ms)”).

Detailed Description

struct CorePlotting::AxisMapping;

Describes how one axis maps between world (rendering) coordinates and domain (semantically meaningful) values, plus how to format labels.

This is a value type — copy/move freely. All three function members must be non-null for a valid mapping; factory functions guarantee this.

Public Functions Documentation

function label

inline std::string label(
    double world
) const

Shorthand: world → domain → label.

function isValid

inline bool isValid() const

Check whether all required functions are set.

Public Attributes Documentation

variable worldToDomain

std::function< double(double world)> worldToDomain;

Convert world coordinate → domain value (e.g., world_y 0.5 → trial 37).

variable domainToWorld

std::function< double(double domain)> domainToWorld;

Convert domain value → world coordinate (inverse of worldToDomain).

variable formatLabel

std::function< std::string(double domain)> formatLabel;

Format a domain value as a display string (e.g., 37.0 → “Trial 37”).

variable title

std::string title;

Optional axis title (e.g., “Trial”, “Time (ms)”).


Updated on 2026-11-13 at 20:25:42 +0000