r/cpp • u/TCloud20 • Sep 02 '21
Anyone know of a good Data Visualization Library?
Hey guys, I am working on a C++ program that simulates a virus using the SIR model, and I am looking for a way to graphically represent the raw data.
Does anyone know of a good graphing library that I could use? I’ve tried pbPlots, but I can’t get it to work the way I want.
38
Upvotes
13
u/d1722825 Sep 03 '21
22
u/[deleted] Sep 03 '21
Matplotplusplus
4
u/megayippie Sep 03 '21
Implot is a very good debug plotting tool. It's really straight forward to have a drop in plot tool anywhere in the code, and with minimal extra effort of threads you can have it update on the fly
7
u/Pakketeretet Sep 03 '21 edited Sep 03 '21
Having to work at work with matplotlib for visualization I recommend gnuplot. Why? Gnuplot has its own domain-specific plotting language that, while requiring some effort to learn, is just much more suitable for plotting than having to go through a C++ (or any other general purpose programming language) interface. Just write the data you want to plot to file and plot it using gnuplot.
3
u/Artistic_Yoghurt4754 Scientific Computing Sep 03 '21
I will definitely try some the recommendations in the comments, but so far, I have been greatly satisfied by just writing plain SVG files. It’s very easy and fast to learn, you just need to stream to a file and open it in the browser, it’s very flexible, and you do not need any library. Of course, it depends a lot on the type of data you want to plot. With SVG, things are a bit more manual and verbose. If data is so big that programs hang while open it, just rasterise the SVG into an JPG with inkscape.
3
u/dedosk Sep 03 '21
Qt/C++: Qwt
2
u/grandpassacaglia Sep 03 '21
Tecplot
2
u/hmoein Sep 03 '21
This https://github.com/alandefreitas/matplotplusplus and this https://github.com/hosseinmoein/DataFrame combined should make your day
2
u/at-2500 Sep 16 '21
If you do not require interaction with your C++ program, I would recommend exporting your data into a format like csv files, and then use python tools like bokeh (or holoviews) because that will give you the largest amount of freedom. you can even play around with it in jupyter notebooks.
Otherwise, I'd go with VTK.
1
u/foldingarmour Jul 13 '22
https://github.com/ABRG-Models/morphologica is a relatively new, header-only C++17 library for fast data visualization. It renders using OpenGL, gives you 2D and 3D graphics and it's easy to create custom datavis models. I wrote it because I wanted *high performance* visualisation that would update as I was running a simulation without using much of the CPU resource.
1
u/Puzzleheaded_One_966 Jan 11 '24
Explore Mokkup.ai , an intuitive dashboard wireframing tool designed to streamline the creation of mock dashboard wireframes in under 30 minutes. With an extensive library featuring 150+ templates, organized into 8+ categories such as sales, marketing, and SaaS, you have the flexibility to customize them according to your specific requirements. Additionally, you can easily add a custom theme to personalize your dashboard even further.
0
u/[deleted] Sep 03 '21
Openframeworks too if I don't remember bad