Skip to main content

CorePlotting::YAxisParams

CorePlotting::YAxisParams

Parameters for Y-axis coordinate conversions. More…

#include <TimeAxisCoordinates.hpp>

Public Functions

Name
YAxisParams() =default
Default constructor.
YAxisParams(float y_min, float y_max, int height, float pan =0.0f)
Construct from explicit values.
std::pair< float, float > getEffectiveRange() const
Get the effective Y range accounting for pan offset.

Public Attributes

Name
float world_y_min
Minimum world Y coordinate.
float world_y_max
Maximum world Y coordinate.
float pan_offset
Vertical pan offset (applied to world bounds).
int viewport_height_px
Canvas height in pixels.

Detailed Description

struct CorePlotting::YAxisParams;

Parameters for Y-axis coordinate conversions.

Bundles information for converting between canvas Y pixel coordinates and world Y coordinates. Accounts for viewport bounds and pan offset.

Note: Unlike time axis (which maps to time values), Y-axis maps to “world” coordinates. Converting world Y to actual data values requires additional series-specific transforms (see worldYToAnalogValue).

Public Functions Documentation

function YAxisParams

YAxisParams() =default

Default constructor.

function YAxisParams

inline YAxisParams(
    float y_min,
    float y_max,
    int height,
    float pan =0.0f
)

Construct from explicit values.

Parameters:

  • y_min Minimum world Y coordinate
  • y_max Maximum world Y coordinate
  • height Viewport height in pixels
  • pan Vertical pan offset (default 0)

function getEffectiveRange

inline std::pair< float, float > getEffectiveRange() const

Get the effective Y range accounting for pan offset.

Return: Pair of (effective_y_min, effective_y_max)

Public Attributes Documentation

variable world_y_min

float world_y_min {-1.0f};

Minimum world Y coordinate.

variable world_y_max

float world_y_max {1.0f};

Maximum world Y coordinate.

variable pan_offset

float pan_offset {0.0f};

Vertical pan offset (applied to world bounds).

variable viewport_height_px

int viewport_height_px {1};

Canvas height in pixels.


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