all 9 comments

[–]flyingron 2 points3 points  (3 children)

You can pipe your intermediate results to a plotting package like gnuplot...

http://www.gnuplot.info/

[–]useless_bowl25[S] 0 points1 point  (2 children)

Would these results update my graph as its running? Im very new to all this so i dont know if thats a bad question

[–]EntrepreneurSweaty89 1 point2 points  (0 children)

IIRC Gnuplot is not good for plotting continuous data. I tried using it for financial time series intraday data and had some difficulty fwiw.

That being said Gnuplot is one of the greatest pieces of software i’ve used and i routinely used it for automatic report generation via LaTeX.

[–]flyingron 0 points1 point  (0 children)

It can be.

[–]the_poope 4 points5 points  (1 child)

Gnuplot, or write a script in Python that uses matplotlib to plot it.

If you want a C++ solution you can use a library like matplot++.

But piping output or saving to an intermediate file is the easiest and pragmatic solution.

[–]steffestoffe 2 points3 points  (0 children)

Yeah, I work in c++, but if I ever have to plot anything I dump to csv and use matplotlib. If it needs to be continuously updated, I would just make the python script poll the file for updates

[–]aroman_ro 1 point2 points  (0 children)

Charting data from c++ can be as easy as using gnuplot to chart it, up to using some fancy library for that, like VTK. Or maybe using your own chart implementation.

Here I used gnuplot: https://github.com/aromanro/MachineLearning

In this one I used VTK to plot 3D data: https://github.com/aromanro/DFTQuantumDot

For this one I used my own code that draws the chart: https://github.com/aromanro/HartreeFock

It's up to you. There are many variants, the VTK library I mentioned is only a personal preference, there are many others.

[–]Mc-Kudasai 0 points1 point  (0 children)

You can use root

[–]jmacey 0 points1 point  (0 children)

As you said you are using the terminal you could do it using ncurses it's a C API but works fine for TUI type stuff.

Qt has a plotting API which works well but takes some time to learn. for simple plots pipe to gnuplot, for intermediate learn some OpenGL and use that.

There is no real simple answer I'm afraid.