csv file to chart

Hello friend's,

I would like for some help.
I'm looking for a way to present some CSV sheet as a graph.
i have open the file, and read the sata shouls be easy, but i dont know how can i genrate the data into graph line.

please advice,

thanks,
Do you mean "store in graph data structure" or "plot a picture"?

If the latter:
I would use gnuplot http://www.gnuplot.info/ rather than C++.
If you absolutely have to write a C/C++ program, then use gnuplot's library to do the hard work.
If your data is the first two columns of a CSV file, then, as @keskiverto says, you can just use wgnuplot. In that program (e.g.):
set datafile separator comma
p "temp.csv"


If you want other columns (say 2 and 5) then:
set datafile separator comma
p "temp.csv" u 2:5


If you want to plot a pretty graph directly from a program then use python and the numpy and matplotlib libraries.

Of course, if it's just a CSV file then you could simply open it in Excel and plot a graph there.
Last edited on
Topic archived. No new replies allowed.