epezent / epezent/implot

ImGui::PlotLine doesn't rebuild itself.

Open
#456 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6.2k
Forks
693
PR merge metrics
No merged PRs in 30d

Description

Hi, for a school project we have to graph some data with imgui so I decided to use Implot.

```cpp
ImGui::Begin("Exercise 1");
if (ImGui::Button("Run benchmark", ImVec2(100, 20)))
{
BenchMarkExercise1();
}

if (ImPlot::BeginPlot("Exercise 1"))
{

ImPlot::SetupAxes("Allocation size", "Time");
ImPlot::PlotLine("Speed", m_Iterations.data(), m_Ex1Results.data(), (int)m_Iterations.size());
ImPlot::EndPlot();
}

ImGui::End();
```

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the example around ImGui::Button, ImPlot::BeginPlot, and ImPlot::PlotLine, then inspect how PlotLine receives updated vector data after BenchMarkExercise1() runs. Done means pressing “Run benchmark” causes the plot to display the new data without breaking the existing plot lifecycle.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.