Struct QAccelPlot::Internal::HeatmapGridDimension¶
ClassList > QAccelPlot > Internal > HeatmapGridDimension
One dimension of a heatmap grid: count cells between the edgesfrom andto .
#include <HeatmapGrid.hpp>
Public Attributes¶
| Type | Name |
|---|---|
| int | count Number of cells. |
| double | from Outer edge of cell 0. |
| bool | logSpacing Whether the cells are evenly spaced in log10 instead of linearly. |
| double | to Outer edge of the last cell. |
Public Functions¶
| Type | Name |
|---|---|
| double | cellCenter (int index) const Returns the center of cell index: arithmetic under linear spacing, geometric under log spacing. |
| double | cellCoordinate (double value) const Returns the fractional cell coordinate of data value , or NaN when no cell can contain it. |
| std::optional< std::pair< double, double > > | dataExtent (bool logAxis) const Returns the ordered extent of the grid on an axis that is logarithmic when logAxis is set. |
| bool | isValid () const Returns whether both edges are finite, and positive under log spacing. |
| HeatmapShaderMapping | shaderMapping (const AxisMapping & axis, double length) const Returns the mapping from pixels along an axis of length pixels, mapped by__axis , to cell coordinates. |
Public Attributes Documentation¶
variable count¶
Number of cells.
variable from¶
Outer edge of cell 0.
variable logSpacing¶
Whether the cells are evenly spaced in log10 instead of linearly.
variable to¶
Outer edge of the last cell.
Public Functions Documentation¶
function cellCenter¶
Returns the center of cell index: arithmetic under linear spacing, geometric under log spacing.
function cellCoordinate¶
Returns the fractional cell coordinate of data value , or NaN when no cell can contain it.
function dataExtent¶
Returns the ordered extent of the grid on an axis that is logarithmic when logAxis is set.
std::optional< std::pair< double, double > > QAccelPlot::Internal::HeatmapGridDimension::dataExtent (
bool logAxis
) const
On a log axis the extent starts at the first cell edge above zero. Returns std::nullopt for an invalid dimension, and on a log axis for a grid entirely at or below zero.
function isValid¶
Returns whether both edges are finite, and positive under log spacing.
function shaderMapping¶
Returns the mapping from pixels along an axis of length pixels, mapped by__axis , to cell coordinates.
HeatmapShaderMapping QAccelPlot::Internal::HeatmapGridDimension::shaderMapping (
const AxisMapping & axis,
double length
) const
Computed in double precision relative to pixel 0, so that the single-precision shader only works with cell coordinates near the visible cells.
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/series/internal/HeatmapGrid.hpp