Plot

Overview

class omdi::Plot

Abstract base class for different types of plots.

The omdi::Plot class defines a minimal interface for plotting objects in the omdi framework. Concrete plot types such as omdi::ScatterPlot and omdi::PcolorPlot derive from this base class and implement the pure virtual omdi::Plot::plot() method.

Each plot has a string label that can be used as a title or identifier in ImGui/ImPlot contexts.

Data members

std::string omdi::Plot::m_label

Label used to identify the plot (e.g. as a title in ImPlot).

Defaults to "GenericPlot" if no label is provided to the constructor.

Constructor

omdi::Plot::Plot(const std::string &label = "GenericPlot")

Construct a plot with the given label.

Parameters:

label – Human-readable label for the plot (default: "GenericPlot").

Public interface

virtual void omdi::Plot::plot() = 0

Pure virtual function that renders the plot.

Concrete subclasses must implement this method to perform the actual drawing using ImGui/ImPlot or other rendering backends.

const std::string &omdi::Plot::label() const

Get the label associated with the plot.

Returns:

Constant reference to the internal label string.