Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
ImPlot: Advanced 2D Plotting for Dear ImGui (github.com/epezent)
94 points by matt_d on May 9, 2020 | hide | past | favorite | 6 comments


ImGui is a fantastic, and much beloved C++ library whose primary use is to create debug/level editor UIs in games, but people use it for many other purposes as well, some of them quite complex. It can plug into various renderers prety easily, and bindings exist for many popular languages, like Rust, and Rust. It was inspired by this talk given in 2005 by casey muratori on immediate mode guis:

https://www.youtube.com/watch?v=Z1qyvQsjK5Y

Neat to see additions like this that can plug into it.

The rust joke was on purpose.


I used ImGui to write control panels for robots running ROS. It's an amazing library.


Interesting tool but couldn’t discern the interface from the README.

On a side note, does anyone have any recommendations for C++ plotting libraries that integrate nicely with Eigen matrices/vectors? Even better if it is usable through lldb when breakpoints are set. I’m trying to recreate my workflow in matlab where you can set a breakpoint at some point in the code and visualize through different plots the variables when writing an algorithm. I find this makes matlab very nice for prototyping and the lack of this workflow becomes a real pain point when we go to convert our matlab implementation to a more performant C++ implementation.


ImGui won't work in a breakpoint, but on the other hand it's more or less designed to do what you want, in the sense that there is not a lot of ceremony required to create a slider to adjust a variable (unlike, say, Qt, where you to need to wire a few things). So if you can keep your program running, you can use Dear ImGui as a sort of custom debugger front end. Many people in the video game industry use it to do exactly that.


> Interesting tool but couldn’t discern the interface from the README.

The README isn’t particularly helpful, but the API is rather self-explanatory looking at the header. Eg, this line from the README:

    ImGui::PlotBar("My Bar Plot", values, 10);
values is a pointer to 10 floats.


It depends on your debugger. Visual Studio has a plugin model to support this, but it involves writing a server and a client, and serialising all your data over a socket.

https://docs.microsoft.com/en-us/visualstudio/debugger/creat...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: