-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
Version/Branch:
latest
Back-ends:
glfw + openGL
Compiler, OS:
macOS + clang17
Details:
I downloaded the latest one imgui-bundle, I tried using the demo 'sandbox_plot_in_node.cpp' below, I found that when I right-click to open the pop-up box of the chart, it shows strange cropping, and sometimes a part is missing。
Minimal, Complete and Verifiable Example code:
Based on sandbox_plot_in_node.cpp
void gui()
{
static ImVec2 plotSize(200, 200);
static ImVec2 plotSize2(200, 200);
static double xPos = 5.f;
auto myPlotFunction = []()
{
static std::vector<float> x(1000), y(1000);
for (int i = 0; i < 1000; ++i)
{
x[i] = i * 0.01f;
y[i] = sin(x[i]);
}
ImPlot::PlotLine("My Line", x.data(), y.data(), 1000);
ImPlot::DragLineX(0, &xPos, ImVec4(1, 1, 0, 1));
};
auto myPlotFunction2 = []()
{
static std::vector<float> x(1000), y(1000);
for (int i = 0; i < 1000; ++i)
{
x[i] = i * 0.01f;
y[i] = sin(x[i]);
}
ImPlot::PlotLine("My Line", x.data(), y.data(), 1000);
ImPlot::DragLineX(0, &xPos, ImVec4(1, 1, 0, 1));
};
ed::Begin("My Node Editor");
ed::BeginNode(ed::NodeId(1));
ImGui::Text("Hello");
ImGui::Text("World");
plotSize = ImmApp::ShowResizablePlotInNodeEditor("My Plot", plotSize, myPlotFunction);
ed::EndNode();
ed::BeginNode(ed::NodeId(2));
ImGui::Text("Hello");
ImGui::Text("World");
plotSize2 = ImmApp::ShowResizablePlotInNodeEditor("My Plot2", plotSize2, myPlotFunction2);
ed::EndNode();
ed::End();
}PixPin_2025-10-29_13-37-09.mp4
Finally, Thank you for this amazing library!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels