3

I want to plot a data file (speed11.data) in Linux. the data file looking like:

1,4.45823517e+01
2,4.45873528e+01
3,4.45923538e+01
4,4.45973549e+01

I used gnuplot, but I got error.

 gnuplot> plot "speed11.data"


gnuplot> 1,4.45823517e+01
         ^
         "speed11.data", line 1: invalid command

How to plot this graph?

The output of locale is:

LANG=en_CA.UTF-8
LC_CTYPE="en_CA.UTF-8"
LC_NUMERIC="en_CA.UTF-8"
LC_TIME="en_CA.UTF-8"
LC_COLLATE="en_CA.UTF-8"
LC_MONETARY="en_CA.UTF-8"
LC_MESSAGES="en_CA.UTF-8"
LC_PAPER="en_CA.UTF-8"
LC_NAME="en_CA.UTF-8"
LC_ADDRESS="en_CA.UTF-8"
LC_TELEPHONE="en_CA.UTF-8"
LC_MEASUREMENT="en_CA.UTF-8"
LC_IDENTIFICATION="en_CA.UTF-8"
LC_ALL=
7
  • 3
    Worked fine for me after replacing the commas with spaces. Commented Dec 31, 2014 at 21:26
  • I put tabs instead of ",", but I could not plot. gnuplot> 1 4.45823517e+01 ^ "speed13b.data", line 1: invalid command Commented Dec 31, 2014 at 21:53
  • All I can suggest is perhaps re-installing gnuplot. Commented Dec 31, 2014 at 21:54
  • Also please post version info. Ex: uname -a && gnuplot --version && dpkg -l | grep "^i.*gnuplot" Commented Jan 1, 2015 at 0:51
  • Also please post gnuplot <(echo "show terminal"). Commented Jan 1, 2015 at 1:11

1 Answer 1

1

For gnuplot, you might want to look at this post that deals with using comma separated values (CSV) in gnuplot.

Alternatively , you might want to try using R instead of gnuplot. R has the ability to import csv data files and is able to do some sophisticated graphing.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.