fix plot
This commit is contained in:
2026-02-14 14:31:02 +01:00
parent 4ba874fc15
commit 4371b711a5
4 changed files with 25 additions and 5 deletions
+6
View File
@@ -35,6 +35,12 @@ std::string UI_plot::y_label() const
return m_y_label;
}
void UI_plot::add_value(double y)
{
m_x_vals.push_back((double)m_x_vals.size());
m_y_vals.push_back(y);
}
void UI_plot::add_value(double x, double y)
{
m_x_vals.push_back(x);
+1
View File
@@ -20,6 +20,7 @@ class UI_plot : public UI_item
bool x_label_enabled() const;
void set_y_label_enabled(bool enabled);
bool y_label_enabled() const;
void add_value(double y);
void add_value(double x, double y);
void clean_vals();