Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
correlation::plotters Namespace Reference

Namespaces

namespace  detail
namespace  layout

Classes

class  ColormapService
 High-throughput, perceptually uniform scientific colormap engine. More...
struct  Glyph
 Represents a single vector character glyph. More...
struct  TextRenderParameters
 Parameters for vector text rendering. More...
struct  GlyphParameters
 Parameters for registering a vector character glyph. More...
class  Roboto
 High-fidelity Roboto vector font implementation. More...
struct  ComparisonQuery
 Parameters defining a multi-dataset comparison PDF query. More...
struct  ReferenceLine
 User-defined reference marker line (constant X or constant Y). More...
struct  PlotConfig
 Theme and layout configuration for the plot. More...
struct  MetricPlotSettings
 User-configured axis limits, ticks, and scaling for a specific plot metric. More...
struct  HoverInfo
 Information about the mouse hover position. More...
struct  CurveStyle
 Custom rendering style for individual comparison curves. More...
struct  LabeledHistogram
 A labeled histogram for comparison rendering. More...
struct  RgbaColor
 8-bit RGBA color representation for vertex colors and framebuffers. More...

Typedefs

using Point2D = std::pair<real_t, real_t>

Enumerations

enum class  ColormapType : uint8_t { Viridis = 0 , Plasma = 1 , Coolwarm = 2 , Turbo = 3 }
 Supported scientific colormaps for scalar mapping. More...
enum class  TextAnchor : std::uint8_t { Start , Middle , End }
 Horizontal alignment / anchor options for SVG text rendering. More...

Functions

void renderHistogramAsPdf (const correlation::analysis::Histogram &hist, const std::string &filepath, const PlotConfig &config=PlotConfig())
 Renders a single histogram dataset to a PDF document file.
void renderComparisonPdf (const std::vector< LabeledHistogram > &datasets, const ComparisonQuery &query, const PlotConfig &config=PlotConfig())
 Renders an overlaid multi-dataset comparison plot to a PDF document file.
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, x_max].
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 font's inner holes properly.
void renderHistogramAsPng (const correlation::analysis::Histogram &hist, const std::string &filepath, const PlotConfig &config={}, const std::map< std::string, real_t > &ashcroft_weights={}, int dpi=300)
 Renders a single histogram dataset as a high-resolution PNG image.
void renderComparisonPng (const std::vector< LabeledHistogram > &datasets, const std::string &partial_key, const std::string &filepath, const PlotConfig &config={}, int dpi=300)
 Renders multiple comparison histograms as a high-resolution PNG image.
std::string renderComparisonSvg (const std::vector< LabeledHistogram > &datasets, const std::string &partial_key="Total", const PlotConfig &config=PlotConfig(), const HoverInfo &hover=HoverInfo())
 Renders multiple histograms overlaid on a single comparison plot as an SVG string.
std::string renderHistogramAsSvg (const correlation::analysis::Histogram &hist, const PlotConfig &config=PlotConfig(), const HoverInfo &hover=HoverInfo(), const std::map< std::string, real_t > &weights={}, const std::map< std::string, bool > &curve_visibility={}, const std::map< std::string, std::string > &custom_colors={})
 Renders a single Histogram as a self-contained SVG string.

Typedef Documentation

◆ Point2D

Enumeration Type Documentation

◆ ColormapType

enum class correlation::plotters::ColormapType : uint8_t
strong

Supported scientific colormaps for scalar mapping.

Enumerator
Viridis 
Plasma 
Coolwarm 
Turbo 

◆ TextAnchor

enum class correlation::plotters::TextAnchor : std::uint8_t
strong

Horizontal alignment / anchor options for SVG text rendering.

Enumerator
Start 

Left-aligned / start-anchored text.

Middle 

Center-aligned / middle-anchored text.

End 

Right-aligned / end-anchored text.

Function Documentation

◆ renderComparisonPdf()

void correlation::plotters::renderComparisonPdf ( const std::vector< LabeledHistogram > & datasets,
const ComparisonQuery & query,
const PlotConfig & config = PlotConfig() )

Renders an overlaid multi-dataset comparison plot to a PDF document file.

Parameters
datasetsCollection of labeled histogram datasets.
queryComparison query specifying key and destination filepath.
configCanvas layout, colors, and font configuration.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderComparisonPng()

void correlation::plotters::renderComparisonPng ( const std::vector< LabeledHistogram > & datasets,
const std::string & partial_key,
const std::string & filepath,
const PlotConfig & config = {},
int dpi = 300 )

Renders multiple comparison histograms as a high-resolution PNG image.

Parameters
datasetsVector of labeled histogram comparison datasets.
partial_keyTarget partial histogram key (e.g. "Total", "Si-O").
filepathOutput PNG file path.
configVisualization and canvas layout configuration.
dpiTarget DPI resolution (e.g. 150, 300, 600).
Here is the call graph for this function:

◆ renderComparisonSvg()

std::string correlation::plotters::renderComparisonSvg ( const std::vector< LabeledHistogram > & datasets,
const std::string & partial_key = "Total",
const PlotConfig & config = PlotConfig(),
const HoverInfo & hover = HoverInfo() )
nodiscard

Renders multiple histograms overlaid on a single comparison plot as an SVG string.

Parameters
datasetsCollection of labeled histogram datasets to compare.
partial_keyPartial key to visualize across datasets (default "Total").
configCanvas layout, themes, and configuration.
hoverReal-time hover cursor coordinates and dimensions.
Returns
Formatted XML/SVG string representation of the overlaid comparison plot.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderHistogramAsPdf()

void correlation::plotters::renderHistogramAsPdf ( const correlation::analysis::Histogram & hist,
const std::string & filepath,
const PlotConfig & config = PlotConfig() )

Renders a single histogram dataset to a PDF document file.

Parameters
histInput histogram dataset.
filepathDestination filesystem path.
configCanvas layout, colors, and font configuration.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderHistogramAsPng()

void correlation::plotters::renderHistogramAsPng ( const correlation::analysis::Histogram & hist,
const std::string & filepath,
const PlotConfig & config = {},
const std::map< std::string, real_t > & ashcroft_weights = {},
int dpi = 300 )

Renders a single histogram dataset as a high-resolution PNG image.

Parameters
histInput histogram data.
filepathOutput PNG file path.
configVisualization and canvas layout configuration.
ashcroft_weightsPartial weighting map for Ashcroft-Langreth scaling.
dpiTarget DPI resolution (e.g. 150, 300, 600).
Here is the call graph for this function:

◆ renderHistogramAsSvg()

std::string correlation::plotters::renderHistogramAsSvg ( const correlation::analysis::Histogram & hist,
const PlotConfig & config = PlotConfig(),
const HoverInfo & hover = HoverInfo(),
const std::map< std::string, real_t > & weights = {},
const std::map< std::string, bool > & curve_visibility = {},
const std::map< std::string, std::string > & custom_colors = {} )
nodiscard

Renders a single Histogram as a self-contained SVG string.

Parameters
histInput histogram dataset.
configCanvas layout, themes, and configuration.
hoverReal-time hover cursor coordinates and dimensions.
weightsPartial weighting map for Ashcroft-Langreth scaling.
curve_visibilitySelective curve visibility map.
custom_colorsExplicit color override map per partial key.
Returns
Formatted XML/SVG string representation of the plot.
Here is the caller graph for this function:

◆ renderTextAsPath()

std::string correlation::plotters::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 )
inline

Renders text as a filled SVG path using the Roboto outline font. Uses evenodd fill-rule to render the font's inner holes properly.

Here is the call graph for this function:

◆ sampleHistogramClamped()

real_t correlation::plotters::sampleHistogramClamped ( const std::vector< real_t > & x_bins,
const std::vector< real_t > & y_vals,
real_t x_val )
inline

Samples a 1D dataset y(x) at point x using linear interpolation with boundary clamping to [x_min, x_max].