0

I have a csv file which contains 500 rows and 100 columns.

I want to plot the data in the way that:

  1. Each row represent a curve on the graph. Every column represents a value on the curve (100 values).
  2. 500 such curves on the graph.

The code:

set xrange [0:100]
set yrange [0:20]
set term png
set output 'output.png'
set datafile separator ','
plot 'myplot.csv'

But this does not seem to work. How can I configue gnuplot to achieve that?

Edit:

The data is in this format (Shortened):

7.898632397,7.834565295,8.114238484,7.636553599,7.759415909,7.829112422
7.898632397,8.379427648,8.418542273,7.921914453,7.558814684,7.237529826
7.898632397,7.862492565,8.132579657,8.419279034,8.350564183,8.578430051
7.898632397,7.613394134,7.213820144,7.42985323,7.74212712,7.144952258
7.898632397,7.736819889,8.14247944,8.025533212,8.256498438,8.133741173
7.898632397,7.906868959,8.032605101,8.308540463,8.238641673,8.143985756
4
  • Could you give us the error or something? It's impossible to help troubleshoot without any diagnostic data. Commented Jun 25, 2018 at 20:45
  • There is no error. I got an empty output file. Commented Jun 25, 2018 at 21:14
  • maybe stackoverflow.com/questions/8646446/… can help Commented Jun 26, 2018 at 4:46
  • Can you easily invert the data so each row has a value on the curve and each column is a curve? Commented Jun 26, 2018 at 20:24

1 Answer 1

0
set datafile separator comma
plot for [row=0:*] 'myplot.csv' matrix every :::row::row with lines

However I suspect that with 500 lines the plot will be too crowded to interpret.

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.