Open SixArne opened 1 year ago
ImGui::Begin("Exercise 1");
if (ImGui::Button("Run benchmark", ImVec2(100, 20)))
{
BenchMarkExercise1();
// default value is set to "default"
m_name = "hello";
}
if (ImPlot::BeginPlot(m_name.c_str()))
{
ImPlot::PlotLine("Speed", m_Iterations.data(), m_Ex1Results.data(), (int)m_Iterations.size());
// this will now update
ImPlot::EndPlot();
}
So when I change the plot title as well it updates fine, but when I don't update the name it won't update anymore.
ImGui::Begin("Exercise 1");
if (ImGui::Button("Run benchmark", ImVec2(100, 20)))
{
BenchMarkExercise1();
//m_name = "hello";
}
if (ImPlot::BeginPlot(m_name.c_str()))
{
ImPlot::PlotLine("Speed", m_Iterations.data(), m_Ex1Results.data(), (int)m_Iterations.size());
// this won't update anymore
ImPlot::EndPlot();
}
Hi, for a school project we have to graph some data with imgui so I decided to use Implot.
m_Iterations is a vector of datatype double and so is m_Ex1Results. Both are initialized to hold the same size of data (10 points)
However when pressing the run benchmark button the graph doesn't display any of this new data.