44 enum class Theme : std::uint8_t {
94 return static_cast<real_t>(1050.0);
96 return static_cast<real_t>(2100.0);
98 return static_cast<real_t>(3000.0);
107 return static_cast<real_t>(788.0);
109 return static_cast<real_t>(1575.0);
111 return static_cast<real_t>(2250.0);
118 [[nodiscard]] std::string_view
bgColor()
const {
219 const std::vector<real_t> &y_vals,
real_t x_val) {
220 if (x_bins.empty() || y_vals.empty() || x_bins.size() != y_vals.size()) {
221 return static_cast<real_t>(0.0);
223 if (x_val <= x_bins.front()) {
224 return y_vals.front();
226 if (x_val >= x_bins.back()) {
227 return y_vals.back();
229 const auto it_idx = std::ranges::lower_bound(x_bins, x_val);
230 const auto idx =
static_cast<std::size_t
>(std::distance(x_bins.begin(), it_idx));
234 const real_t x_0 = x_bins[idx - 1];
235 const real_t x_1 = x_bins[idx];
236 const real_t y_0 = y_vals[idx - 1];
237 const real_t y_1 = y_vals[idx];
238 if (std::abs(x_1 - x_0) <
static_cast<real_t>(1e-12)) {
241 return y_0 + (x_val - x_0) / (x_1 - x_0) * (y_1 - y_0);
250 bool use_native_text =
false) {
251 std::string anchor_str =
"start";
253 anchor_str =
"middle";
258 if (use_native_text) {
260 " <text x=\"{:.1f}\" y=\"{:.1f}\" font-family=\"'Outfit', 'Plus Jakarta Sans', 'Inter', "
261 "'Roboto', 'Helvetica Neue', "
262 "sans-serif\" font-size=\"{:.1f}\" text-anchor=\"{}\" fill=\"{}\">{}</text>\n",
263 x_pos, y_pos, size, anchor_str,
color, text);
270 .anchor = anchor_str,
272 return std::format(
" <path d=\"{}\" fill=\"{}\" fill-rule=\"evenodd\" stroke=\"none\"/>\n",
279constexpr std::array<std::string_view, 8>
K_COLORS = {
292 "#000000",
"#404040",
"#808080",
"#B0B0B0",
"#D0D0D0",
297 "#440154",
"#3B528B",
"#21908C",
"#5DC863",
"#FDE725",
309 if (position <= stops.front().t) {
310 return std::format(
"#{:02X}{:02X}{:02X}",
static_cast<unsigned int>(stops.front().r),
311 static_cast<unsigned int>(stops.front().g),
312 static_cast<unsigned int>(stops.front().b));
314 if (position >= stops.back().t) {
315 return std::format(
"#{:02X}{:02X}{:02X}",
static_cast<unsigned int>(stops.back().r),
316 static_cast<unsigned int>(stops.back().g),
317 static_cast<unsigned int>(stops.back().b));
319 for (std::size_t i = 0; i < stops.size() - 1; ++i) {
320 if (position >= stops[i].t && position <= stops[i + 1].t) {
321 const float factor = (position - stops[i].t) / (stops[i + 1].t - stops[i].t);
322 const auto red =
static_cast<unsigned int>(std::round(
323 std::lerp(
static_cast<float>(stops[i].r),
static_cast<float>(stops[i + 1].r), factor)));
324 const auto green =
static_cast<unsigned int>(std::round(
325 std::lerp(
static_cast<float>(stops[i].g),
static_cast<float>(stops[i + 1].g), factor)));
326 const auto blue =
static_cast<unsigned int>(std::round(
327 std::lerp(
static_cast<float>(stops[i].b),
static_cast<float>(stops[i + 1].b), factor)));
328 return std::format(
"#{:02X}{:02X}{:02X}", red, green, blue);
331 return std::format(
"#{:02X}{:02X}{:02X}",
static_cast<unsigned int>(stops.back().r),
332 static_cast<unsigned int>(stops.back().g),
333 static_cast<unsigned int>(stops.back().b));
339 constexpr std::array<ColorStop, 5> K_MAGMA_STOPS = {
340 ColorStop{.t = 0.00F, .r = 0, .g = 0, .b = 4},
341 ColorStop{.t = 0.25F, .r = 81, .g = 18, .b = 124},
342 ColorStop{.t = 0.50F, .r = 183, .g = 55, .b = 121},
343 ColorStop{.t = 0.75F, .r = 252, .g = 137, .b = 97},
344 ColorStop{.t = 1.00F, .r = 252, .g = 253, .b = 191},
349 constexpr std::array<ColorStop, 4> K_HEATMAP_STOPS = {
350 ColorStop{.t = 0.00F, .r = 0, .g = 0, .b = 0},
351 ColorStop{.t = 0.33F, .r = 255, .g = 0, .b = 0},
352 ColorStop{.t = 0.66F, .r = 255, .g = 255, .b = 0},
353 ColorStop{.t = 1.00F, .r = 255, .g = 255, .b = 255},
358 constexpr std::array<ColorStop, 5> K_RAINBOW_STOPS = {
359 ColorStop{.t = 0.00F, .r = 0, .g = 0, .b = 255},
360 ColorStop{.t = 0.25F, .r = 0, .g = 255, .b = 255},
361 ColorStop{.t = 0.50F, .r = 0, .g = 255, .b = 0},
362 ColorStop{.t = 0.75F, .r = 255, .g = 255, .b = 0},
363 ColorStop{.t = 1.00F, .r = 255, .g = 0, .b = 0},
368 constexpr std::array<ColorStop, 5> K_TURBO_STOPS = {
369 ColorStop{.t = 0.00F, .r = 48, .g = 18, .b = 59},
370 ColorStop{.t = 0.25F, .r = 26, .g = 228, .b = 182},
371 ColorStop{.t = 0.50F, .r = 162, .g = 252, .b = 60},
372 ColorStop{.t = 0.75F, .r = 251, .g = 128, .b = 34},
373 ColorStop{.t = 1.00F, .r = 122, .g = 4, .b = 3},
378 constexpr std::array<ColorStop, 5> K_PLASMA_STOPS = {
379 ColorStop{.t = 0.00F, .r = 13, .g = 8, .b = 135},
380 ColorStop{.t = 0.25F, .r = 106, .g = 0, .b = 168},
381 ColorStop{.t = 0.50F, .r = 177, .g = 42, .b = 144},
382 ColorStop{.t = 0.75F, .r = 225, .g = 100, .b = 98},
383 ColorStop{.t = 1.00F, .r = 252, .g = 166, .b = 54},
388 constexpr std::array<ColorStop, 5> K_INFERNO_STOPS = {
389 ColorStop{.t = 0.00F, .r = 0, .g = 0, .b = 4},
390 ColorStop{.t = 0.25F, .r = 87, .g = 9, .b = 107},
391 ColorStop{.t = 0.50F, .r = 187, .g = 55, .b = 84},
392 ColorStop{.t = 0.75F, .r = 249, .g = 142, .b = 9},
393 ColorStop{.t = 1.00F, .r = 252, .g = 255, .b = 164},
398 constexpr std::array<ColorStop, 5> K_CIVIDIS_STOPS = {
399 ColorStop{.t = 0.00F, .r = 0, .g = 32, .b = 81},
400 ColorStop{.t = 0.25F, .r = 58, .g = 71, .b = 108},
401 ColorStop{.t = 0.50F, .r = 107, .g = 112, .b = 116},
402 ColorStop{.t = 0.75F, .r = 161, .g = 156, .b = 114},
403 ColorStop{.t = 1.00F, .r = 254, .g = 254, .b = 98},
421 const float position =
422 (total_count <= 1) ? 0.5F :
static_cast<float>(index) /
static_cast<float>(total_count - 1);
429 return color(index, 8, pal);
434 if (std::abs(data_max - data_min) <
static_cast<real_t>(1e-15)) {
435 return (svg_min + svg_max) /
static_cast<real_t>(2.0);
437 return svg_min + (value - data_min) / (data_max - data_min) * (svg_max - svg_min);
457 if (actual_max < actual_min) {
458 std::swap(actual_min, actual_max);
460 if (custom_step >
static_cast<real_t>(0.0)) {
465 const auto num_ticks =
467 ?
static_cast<int>(std::floor(
471 for (
int idx = 0; idx < num_ticks; ++idx) {
474 }
else if (std::abs(actual_max - actual_min) <
static_cast<real_t>(1e-12)) {
475 min = actual_min -
static_cast<real_t>(0.5);
476 max = actual_min +
static_cast<real_t>(0.5);
478 ticks.push_back(actual_min);
480 const real_t range_val =
niceNum(actual_max - actual_min,
false);
486 const auto num_ticks =
488 ?
static_cast<int>(std::floor(
492 for (
int idx = 0; idx < num_ticks; ++idx) {
493 const auto val = first_tick +
static_cast<real_t>(idx) *
spacing;
494 ticks.push_back(val);
500 const int num_ticks =
static_cast<int>(std::round(range_span /
spacing)) + 1;
501 for (
int idx = 0; idx < num_ticks; ++idx) {
503 ticks.push_back(value);
517 const real_t exponent = std::floor(std::log10(range));
518 const real_t fraction = range / std::pow(
static_cast<real_t>(10.0), exponent);
519 auto nice_fraction =
static_cast<real_t>(0.0);
522 if (fraction <
static_cast<real_t>(1.5)) {
523 nice_fraction =
static_cast<real_t>(1.0);
524 }
else if (fraction <
static_cast<real_t>(3.0)) {
525 nice_fraction =
static_cast<real_t>(2.0);
526 }
else if (fraction <
static_cast<real_t>(7.0)) {
527 nice_fraction =
static_cast<real_t>(5.0);
529 nice_fraction =
static_cast<real_t>(10.0);
532 if (fraction <=
static_cast<real_t>(1.0)) {
533 nice_fraction =
static_cast<real_t>(1.0);
534 }
else if (fraction <=
static_cast<real_t>(2.0)) {
535 nice_fraction =
static_cast<real_t>(2.0);
536 }
else if (fraction <=
static_cast<real_t>(5.0)) {
537 nice_fraction =
static_cast<real_t>(5.0);
539 nice_fraction =
static_cast<real_t>(10.0);
542 return nice_fraction * std::pow(
static_cast<real_t>(10.0), exponent);
550 const real_t abs_value = std::abs(value);
551 if (abs_value <
static_cast<real_t>(1e-12)) {
555 if (abs_value <
static_cast<real_t>(0.01) || abs_value >=
static_cast<real_t>(10000.0)) {
556 const int exponent =
static_cast<int>(std::floor(std::log10(abs_value)));
558 value / std::pow(
static_cast<real_t>(10.0),
static_cast<real_t>(exponent));
559 std::string res = std::format(
"{:.1f}×10", fraction);
560 const std::string exp_s = std::to_string(exponent);
561 for (
const char chr : exp_s) {
564 }
else if (chr ==
'0') {
566 }
else if (chr ==
'1') {
568 }
else if (chr ==
'2') {
570 }
else if (chr ==
'3') {
572 }
else if (chr ==
'4') {
574 }
else if (chr ==
'5') {
576 }
else if (chr ==
'6') {
578 }
else if (chr ==
'7') {
580 }
else if (chr ==
'8') {
582 }
else if (chr ==
'9') {
589 std::string str = std::format(
"{:.2f}", value);
590 const auto dot = str.find(
'.');
591 if (dot != std::string::npos) {
592 const std::size_t last = str.find_last_not_of(
'0');
593 if (last != std::string::npos && last > dot) {
594 str = str.substr(0, last + 1);
595 }
else if (last == dot) {
596 str = str.substr(0, dot);
614 const auto k_left =
static_cast<real_t>(100.0);
615 const auto k_right =
static_cast<real_t>(40.0);
616 const auto k_top =
static_cast<real_t>(50.0);
617 const auto k_bottom =
static_cast<real_t>(90.0);
622 .px1 = eff_w - k_right,
624 .py1 = eff_h - k_bottom,
632 const real_t widget_aspect = (widget_h > 0) ? (widget_w / widget_h) : (eff_w / eff_h);
633 const real_t plot_aspect = eff_w / eff_h;
634 auto scale =
static_cast<real_t>(1.0);
635 auto offset_x =
static_cast<real_t>(0.0);
636 auto offset_y =
static_cast<real_t>(0.0);
637 if (widget_aspect > plot_aspect) {
638 scale = (widget_h > 0) ? (widget_h / eff_h) :
static_cast<real_t>(1.0);
639 offset_x = (widget_w - eff_w * scale) /
static_cast<real_t>(2.0);
641 scale = (widget_w > 0) ? (widget_w / eff_w) :
static_cast<real_t>(1.0);
642 offset_y = (widget_h - eff_h * scale) /
static_cast<real_t>(2.0);
644 const real_t svg_x = (scale > 0) ? ((screen_x - offset_x) / scale) : screen_x;
645 const real_t svg_y = (scale > 0) ? ((screen_y - offset_y) / scale) : screen_y;
646 return {svg_x, svg_y};
652 auto [svg_x, svg_y] =
screenToSvg(screen_x, screen_y, widget_w, widget_h, config);
654 const real_t clamped_x = std::clamp(svg_x, geom.px0, geom.px1);
655 const real_t clamped_y = std::clamp(svg_y, geom.py0, geom.py1);
658 x_scale.
min + (clamped_x - geom.px0) / (geom.px1 - geom.px0) * (x_scale.
max - x_scale.
min);
660 y_scale.
min + (geom.py1 - clamped_y) / (geom.py1 - geom.py0) * (y_scale.
max - y_scale.
min);
661 return {data_x, data_y};
668 const real_t widget_aspect = (widget_h > 0) ? (widget_w / widget_h) : (eff_w / eff_h);
669 const real_t plot_aspect = eff_w / eff_h;
670 auto scale =
static_cast<real_t>(1.0);
671 auto offset_x =
static_cast<real_t>(0.0);
672 auto offset_y =
static_cast<real_t>(0.0);
673 if (widget_aspect > plot_aspect) {
674 scale = (widget_h > 0) ? (widget_h / eff_h) :
static_cast<real_t>(1.0);
675 offset_x = (widget_w - eff_w * scale) /
static_cast<real_t>(2.0);
677 scale = (widget_w > 0) ? (widget_w / eff_w) :
static_cast<real_t>(1.0);
678 offset_y = (widget_h - eff_h * scale) /
static_cast<real_t>(2.0);
680 const real_t screen_x = offset_x + svg_x * scale;
681 const real_t screen_y = offset_y + svg_y * scale;
682 return {screen_x, screen_y};
690 (x_scale.
max != x_scale.
min) ? (x_scale.
max - x_scale.
min) :
static_cast<real_t>(1.0);
692 (y_scale.
max != y_scale.
min) ? (y_scale.
max - y_scale.
min) :
static_cast<real_t>(1.0);
694 const real_t svg_x = geom.px0 + (data_x - x_scale.
min) / x_denom * (geom.px1 - geom.px0);
695 const real_t svg_y = geom.py1 - (data_y - y_scale.
min) / y_denom * (geom.py1 - geom.py0);
697 return svgToScreen(svg_x, svg_y, widget_w, widget_h, config);
Manager for distribution function calculations (RDF, PAD, S(Q), etc.).
High-fidelity Roboto vector font for SVG path rendering.
Floating point precision type definitions for Correlation.
static Roboto & instance()
Definition PathFont.cpp:15
std::string render(TextRenderParameters const ¶ms)
Renders a string of text as SVG path data using parameters struct.
Definition PathFont.cpp:46
Definition PlotTypes.hpp:276
std::pair< real_t, real_t > svgToScreen(real_t svg_x, real_t svg_y, real_t widget_w, real_t widget_h, const PlotConfig &config)
Definition PlotTypes.hpp:664
std::pair< real_t, real_t > screenToSvg(real_t screen_x, real_t screen_y, real_t widget_w, real_t widget_h, const PlotConfig &config)
Definition PlotTypes.hpp:628
std::pair< real_t, real_t > screenToData(real_t screen_x, real_t screen_y, real_t widget_w, real_t widget_h, const PlotConfig &config, const NiceScale &x_scale, const NiceScale &y_scale)
Definition PlotTypes.hpp:649
constexpr std::array< std::string_view, 5 > K_GRAYSCALE
Grayscale palette for B&W printing.
Definition PlotTypes.hpp:291
constexpr std::array< std::string_view, 8 > K_COLORS
Okabe-Ito colorblind-safe palette (calibrated for high contrast on dark and light).
Definition PlotTypes.hpp:279
std::string interpolateColorStops(float position, std::span< const ColorStop > stops)
Definition PlotTypes.hpp:305
std::string sampleContinuousColormap(float position, PlotConfig::Palette pal)
Definition PlotTypes.hpp:336
real_t mapValue(real_t value, real_t data_min, real_t data_max, real_t svg_min, real_t svg_max)
Definition PlotTypes.hpp:432
PlotViewportGeometry getViewportGeometry(const PlotConfig &config)
Definition PlotTypes.hpp:611
std::string color(std::size_t index, std::size_t total_count, PlotConfig::Palette pal)
Definition PlotTypes.hpp:412
std::pair< real_t, real_t > dataToScreen(real_t data_x, real_t data_y, real_t widget_w, real_t widget_h, const PlotConfig &config, const NiceScale &x_scale, const NiceScale &y_scale)
Definition PlotTypes.hpp:685
std::string fmtScientific(real_t value)
Formats a number for SVG display, using scientific notation if needed.
Definition PlotTypes.hpp:549
constexpr std::array< std::string_view, 5 > K_VIRIDIS
Viridis perceptually uniform palette.
Definition PlotTypes.hpp:296
Definition ColormapService.hpp:18
TextAnchor
Horizontal alignment / anchor options for SVG text rendering.
Definition PlotTypes.hpp:188
@ End
Right-aligned / end-anchored text.
Definition PlotTypes.hpp:191
@ Start
Left-aligned / start-anchored text.
Definition PlotTypes.hpp:189
@ Middle
Center-aligned / middle-anchored text.
Definition PlotTypes.hpp:190
real_t sampleHistogramClamped(const std::vector< real_t > &x_bins, const std::vector< real_t > &y_vals, real_t x_val)
Samples a 1D dataset y(x) at point x using linear interpolation with boundary clamping to [x_min,...
Definition PlotTypes.hpp:218
std::string renderTextAsPath(const std::string &text, real_t x_pos, real_t y_pos, real_t size, TextAnchor anchor, std::string_view color, bool use_native_text=false)
Renders text as a filled SVG path using the Roboto outline font. Uses evenodd fill-rule to render the...
Definition PlotTypes.hpp:248
double real_t
Definition Precision.hpp:18
Container for a single calculated distribution function.
Definition DistributionFunctions.hpp:226
Custom rendering style for individual comparison curves.
Definition PlotTypes.hpp:197
bool visible
Visibility toggle flag.
Definition PlotTypes.hpp:201
float stroke_width
Stroke line thickness in px.
Definition PlotTypes.hpp:199
std::string color_hex
Custom hex color string (e.g. "#E63946"). Empty uses default palette.
Definition PlotTypes.hpp:198
int dash_style
Dash pattern style (0: Solid, 1: Dashed, 2: Dotted).
Definition PlotTypes.hpp:200
Information about the mouse hover position.
Definition PlotTypes.hpp:176
real_t widget_height
Definition PlotTypes.hpp:181
bool active
Definition PlotTypes.hpp:177
real_t mouse_y
Definition PlotTypes.hpp:179
real_t widget_width
Definition PlotTypes.hpp:180
real_t mouse_x
Definition PlotTypes.hpp:178
A labeled histogram for comparison rendering.
Definition PlotTypes.hpp:207
CurveStyle style
Per-curve custom style settings.
Definition PlotTypes.hpp:210
bool is_difference
Flag indicating if this is an overlaid difference curve.
Definition PlotTypes.hpp:211
std::string label
Run / dataset label.
Definition PlotTypes.hpp:208
const correlation::analysis::Histogram * hist
Pointer to histogram data.
Definition PlotTypes.hpp:209
User-configured axis limits, ticks, and scaling for a specific plot metric.
Definition PlotTypes.hpp:156
bool auto_ticks
Definition PlotTypes.hpp:163
std::optional< real_t > manual_y_max
Definition PlotTypes.hpp:162
std::optional< real_t > manual_y_min
Definition PlotTypes.hpp:161
int minor_subdivisions
Definition PlotTypes.hpp:166
std::optional< real_t > manual_x_min
Definition PlotTypes.hpp:158
std::optional< real_t > manual_x_max
Definition PlotTypes.hpp:159
bool show_minor_grid
Definition PlotTypes.hpp:169
real_t x_major_step
Definition PlotTypes.hpp:164
bool auto_x
Definition PlotTypes.hpp:157
bool show_major_grid
Definition PlotTypes.hpp:168
bool y_log_scale
Definition PlotTypes.hpp:167
bool auto_y
Definition PlotTypes.hpp:160
real_t y_major_step
Definition PlotTypes.hpp:165
real_t line_width
Definition PlotTypes.hpp:170
Theme and layout configuration for the plot.
Definition PlotTypes.hpp:42
PresetSize preset_size
Definition PlotTypes.hpp:89
bool show_markers
Whether to render data point markers (dots).
Definition PlotTypes.hpp:54
std::string_view axisColor() const
Definition PlotTypes.hpp:122
std::string_view bgColor() const
Definition PlotTypes.hpp:118
std::string_view textColor() const
Definition PlotTypes.hpp:130
Theme theme
Current theme selection.
Definition PlotTypes.hpp:49
real_t width
SVG canvas width (px).
Definition PlotTypes.hpp:50
bool show_difference_curve
Toggle overlaid absolute difference curve Y_diff = Y_ref - Y_target.
Definition PlotTypes.hpp:56
real_t effectiveWidth() const
Definition PlotTypes.hpp:91
bool use_native_text
Use standard SVG <text> elements instead of Hershey paths.
Definition PlotTypes.hpp:65
bool show_grid
Whether to render background grid lines.
Definition PlotTypes.hpp:52
std::optional< real_t > manual_x_min
Definition PlotTypes.hpp:135
bool y_log_scale
Whether Y-axis uses logarithmic (log10) scale.
Definition PlotTypes.hpp:58
std::optional< real_t > manual_y_max
Definition PlotTypes.hpp:138
bool fill_area
Whether to render matching gradient fills under the curves.
Definition PlotTypes.hpp:55
real_t x_major_step
Definition PlotTypes.hpp:142
std::optional< real_t > manual_y_min
Definition PlotTypes.hpp:137
Palette palette
Definition PlotTypes.hpp:80
real_t line_width
Data line stroke width.
Definition PlotTypes.hpp:62
Theme
Visualization themes for the generated SVG.
Definition PlotTypes.hpp:44
@ Light
Standard light theme for publications.
Definition PlotTypes.hpp:45
@ Dark
Modern dark theme for UI integration (e.g., Catppuccin-esque).
Definition PlotTypes.hpp:46
bool show_legend
Toggle legend visibility.
Definition PlotTypes.hpp:64
int minor_subdivisions
Definition PlotTypes.hpp:144
real_t y_major_step
Definition PlotTypes.hpp:143
real_t marker_size
Data point marker radius (px).
Definition PlotTypes.hpp:63
PresetSize
Standard publication sizes.
Definition PlotTypes.hpp:83
@ DoubleColumn
Definition PlotTypes.hpp:86
@ SingleColumn
Definition PlotTypes.hpp:85
@ Default
Definition PlotTypes.hpp:84
@ Presentation
Definition PlotTypes.hpp:87
real_t height
SVG canvas height (px).
Definition PlotTypes.hpp:51
std::string_view gridColor() const
Definition PlotTypes.hpp:126
std::vector< ReferenceLine > reference_lines
Definition PlotTypes.hpp:150
bool show_minor_grid
Whether to render minor subdivision grid lines.
Definition PlotTypes.hpp:53
Palette
Color palette selections.
Definition PlotTypes.hpp:68
@ Magma
Sequential dark to bright purple/yellow.
Definition PlotTypes.hpp:72
@ Rainbow
Standard Jet/HSV rainbow gradient.
Definition PlotTypes.hpp:74
@ Cividis
Colorblind-optimized perceptually uniform.
Definition PlotTypes.hpp:78
@ Turbo
Google Turbo perceptually smooth rainbow.
Definition PlotTypes.hpp:75
@ Inferno
Sequential dark to bright yellow.
Definition PlotTypes.hpp:77
@ Heatmap
Hot thermal gradient (Black-Red-Yellow-White).
Definition PlotTypes.hpp:73
@ Viridis
Perceptually uniform.
Definition PlotTypes.hpp:71
@ Plasma
Sequential purple to yellow/orange.
Definition PlotTypes.hpp:76
@ OkabeIto
Colorblind-safe palette.
Definition PlotTypes.hpp:69
@ Grayscale
B&W printing friendly.
Definition PlotTypes.hpp:70
real_t font_scale
Multiplier for all font sizes.
Definition PlotTypes.hpp:61
std::optional< real_t > manual_x_max
Definition PlotTypes.hpp:136
bool show_peak_callouts
Definition PlotTypes.hpp:147
real_t effectiveHeight() const
Definition PlotTypes.hpp:104
bool manual_ticks
Definition PlotTypes.hpp:141
User-defined reference marker line (constant X or constant Y).
Definition PlotTypes.hpp:32
std::string color_hex
Optional color (default axis color if empty).
Definition PlotTypes.hpp:36
std::string label
Optional text label (e.g. "r = 2.45 Å").
Definition PlotTypes.hpp:35
bool is_vertical
true for X = const, false for Y = const.
Definition PlotTypes.hpp:34
real_t value
Definition PlotTypes.hpp:33
Parameters for vector text rendering.
Definition PathFont.hpp:41
Definition PlotTypes.hpp:300
uint8_t b
Definition PlotTypes.hpp:302
uint8_t r
Definition PlotTypes.hpp:302
float t
Definition PlotTypes.hpp:301
uint8_t g
Definition PlotTypes.hpp:302
Definition PlotTypes.hpp:440
real_t max
Maximum value in data space.
Definition PlotTypes.hpp:442
real_t min
Minimum value in data space.
Definition PlotTypes.hpp:441
Definition PlotTypes.hpp:445
std::vector< real_t > ticks
Generated tick locations.
Definition PlotTypes.hpp:449
real_t spacing
Calculated distance between ticks.
Definition PlotTypes.hpp:448
real_t max
Ending tick value.
Definition PlotTypes.hpp:447
real_t min
Starting tick value.
Definition PlotTypes.hpp:446
static real_t niceNum(real_t range, bool round)
Rounds a range value to a "nice" human-readable number.
Definition PlotTypes.hpp:516
NiceScale(const DataRange &range, int max_ticks=6, bool strict_bounds=false, real_t custom_step=static_cast< real_t >(0.0))
Definition PlotTypes.hpp:453
Definition PlotTypes.hpp:602
real_t kw
Definition PlotTypes.hpp:603
real_t px1
Definition PlotTypes.hpp:606
real_t kh
Definition PlotTypes.hpp:604
real_t py1
Definition PlotTypes.hpp:608
real_t px0
Definition PlotTypes.hpp:605
real_t py0
Definition PlotTypes.hpp:607