Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read DataSet from file #30

Open
AAraKKe opened this issue Jun 1, 2014 · 3 comments
Open

Read DataSet from file #30

AAraKKe opened this issue Jun 1, 2014 · 3 comments

Comments

@AAraKKe
Copy link

AAraKKe commented Jun 1, 2014

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.

@rdp
Copy link
Owner

rdp commented Jun 4, 2014

full input file?

On Sun, Jun 1, 2014 at 2:33 PM, J.P. Araque [email protected]
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: data

What should I do to use a data file as input?

Thanks,
Juanpe.


Reply to this email directly or view it on GitHub
#30.

@AAraKKe
Copy link
Author

AAraKKe commented Jun 5, 2014

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"))

@rdp
Copy link
Owner

rdp commented Jun 5, 2014

so it does work with the expand_path snippet?

On Thu, Jun 5, 2014 at 2:05 AM, J.P. Araque [email protected]
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 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"))


Reply to this email directly or view it on GitHub
#30 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants