Class LinePlot2DWidget

Inheritance Relationships

Base Type

Class Documentation

class SmartPeak::LinePlot2DWidget : public SmartPeak::GenericGraphicWidget

Class for plotting 2D line plots.

NOTE: series data are assumed to be aligned column wise (i.e., each column is a series or x_data_.dimension(1) == series_names_.size())

Public Functions

inline LinePlot2DWidget(const std::string title = "")
inline void setValues(const Eigen::Tensor<float, 2> &x_data, const Eigen::Tensor<float, 2> &y_data, const Eigen::Tensor<std::string, 1> *x_labels, const Eigen::Tensor<std::string, 1> *series_names, const std::string &x_axis_title, const std::string &y_axis_title, const float &x_min, const float &x_max, const float &y_min, const float &y_max, const std::string &plot_title)
virtual void draw() override

Interface to show the widget

NOTE: free to override in inherited implmementations

Protected Attributes

Eigen::Tensor<float, 2> x_data_
Eigen::Tensor<float, 2> y_data_
const Eigen::Tensor<std::string, 1> *x_labels_
const Eigen::Tensor<std::string, 1> *series_names_
std::string x_axis_title_
std::string y_axis_title_
float x_min_
float x_max_
float y_min_
float y_max_
std::string plot_title_