gnuplot stdin, how to plot two lines?

前端 未结 9 1498
栀梦
栀梦 2020-12-09 08:13

I\'m trying to produce a plot with two lines using data taken from stdin. I have a file \"test.csv\":

0,1.1,2
1,2,3
2,6,4
4,4.6,5
5,5,6

I\

9条回答
  •  轮回少年
    2020-12-09 08:49

    I'd try converting the csv file to space separated (assuming no of the records span multiple lines) by piping it through sed instead of setting the separator:

    cat test | sed 's/,/ /g' | gnuplot -p -e "plot '-' using ..."
    

提交回复
热议问题