gnuplot-cpp icon indicating copy to clipboard operation
gnuplot-cpp copied to clipboard

Plotting Armadillo matrix data

Open kapil-iitk opened this issue 5 years ago • 3 comments

Hi,

Thank you for this small library. Is there any way to plot Armadillo data matrix using this library, without saving the data to a file?

Thanks

kapil-iitk avatar Apr 24 '20 18:04 kapil-iitk

I didn't use Armadillo myself yet, but in principle you can send any data to gnuplot via sendLine. You might want to set useBuffer = true.

A good way to get this working would be to:

  1. Create a gnuplot script first and read the data from a file.
  2. Integrate this script into C++ by sending the identical commands to gnuplot.

Let me know if you run into any issues when doing this.

martinruenz avatar Apr 25 '20 15:04 martinruenz

Using a C++ program I am able to plot any variable/matrix data by storing the data in a file temporarily. However, this is time-consuming and not an efficient way to plot data from a program. Is there any way to plot the armadillo matrix?

In other places, some are converting the armadillo data to tuple using other library. However your library is more efficient and small to do the same work except direct plotting.

kapil-iitk avatar Apr 28 '20 07:04 kapil-iitk

I have a similar issue, I need to plot signals and apply some signal processing like ftt and then plot them in real-time. Is it possible to send variables declared within a c++ script to gnuplot without saving the content of this variable to file and then read it?

mariankyoussef avatar Jul 24 '20 03:07 mariankyoussef