Plot¶
Overview¶
-
class omdi::Plot¶
Abstract base class for different types of plots.
The
omdi::Plotclass defines a minimal interface for plotting objects in theomdiframework. Concrete plot types such asomdi::ScatterPlotandomdi::PcolorPlotderive from this base class and implement the pure virtualomdi::Plot::plot()method.Each plot has a string label that can be used as a title or identifier in ImGui/ImPlot contexts.
Data members¶
Constructor¶
Public interface¶
DataPlot<T>¶
-
template<typename T>
class omdi::plots::DataPlot¶ Base class template for plots that own their data.
omdi::plots::DataPlotprovides data storage and management for concrete plot types such asomdi::ScatterPlotandomdi::PcolorPlot. It holds a named map of datasets of typeTand a corresponding map of per-series plot specifications (ImPlotSpec).Concrete plot classes inherit from both
omdi::PlotandDataPlot<T>, gaining the rendering interface from the former and the data management interface from the latter.
Data members¶
-
std::map<std::string, T> omdi::plots::DataPlot::m_data¶
Map of named datasets owned by the plot.
Keys are user-assigned dataset labels; values are data objects of type
T(e.g.,omdi::Pointsoromdi::GridXY).
Constructor¶
Public interface¶
-
template<typename T>
void omdi::plots::DataPlot<T>::update(const std::string &label, T data)¶ Replace or insert a single named dataset.
- Parameters:
label – Name of the dataset to update.
data – New data value (copied by value).
If a dataset with the given label already exists it is replaced; otherwise a new entry is created.
-
template<typename T>
void omdi::plots::DataPlot<T>::update_all(std::map<std::string, T> new_data)¶ Replace all datasets at once.
- Parameters:
new_data – Map of new datasets. Replaces the entire contents of
omdi::plots::DataPlot::m_data.