Read DataSet from file
AAraKKe opened this issue · 3 comments
Hi,
this is more a question than an issue but I cannot fine anything anywhere about it. I want the dataset to be read from a file with two columns. I just do:
plot.data << Gnuplot::DataSet.new("file.dat")but it seems not to work since it complains when running:
line 0: undefined variable: data
What should I do to use a data file as input?
Thanks,
Juanpe.
full input file?
On Sun, Jun 1, 2014 at 2:33 PM, J.P. Araque notifications@github.com
wrote:
Hi,
this is more a question than an issue but I cannot fine anything anywhere
about it. I want the dataset to be read from a file with two columns. I
just do:plot.data << Gnuplot::DataSet.new("file.dat")
but it seems not to work since it complains when running:
line 0: undefined variable: dataWhat should I do to use a data file as input?
Thanks,
Juanpe.—
Reply to this email directly or view it on GitHub
#30.
That was the first thing I did but it gave this error so I thought that I could not use it:
gnuplot> plot /Users/juanpe/code/gnuplot/data/avg_charge_t_499.dat
^
line 0: invalid expression
So it took the string but gnuplot complais about it. This is what I did to have this:
plot.data << Gnuplot::DataSet.new(File.expand_path("data/avg_charge_t_499.dat"))so it does work with the expand_path snippet?
On Thu, Jun 5, 2014 at 2:05 AM, J.P. Araque notifications@github.com
wrote:
That was the first thing I did but it gave this error so I thought that I
could not use it:gnuplot> plot /Users/juanpe/code/gnuplot/data/avg_charge_t_499.dat
^
line 0: invalid expressionSo it took the string but gnuplot complais about it. This is what I did to
have this:plot.data << Gnuplot::DataSet.new(File.expand_path("data/avg_charge_t_499.dat"))
—
Reply to this email directly or view it on GitHub
#30 (comment).