Single column in gnuplot-datafile is not accepted

前端 未结 1 1567
南方客
南方客 2021-01-22 02:28

I want to plot some data in gnuplot (4.6.4 on Ubuntu), and I am running into a strange problem. The data I want to plot is this:

0.200002, 1.802499 , -0.019630 ,         


        
相关标签:
1条回答
  • 2021-01-22 03:08

    Gnuplot uses white spaces as separators for the data columns. Plotting the first and second column works fine, because for the first column the trailing comma is simply ignored, and the second row is separated by a white space. Now, the third column contains only commas, which gnuplot cannot parse to numbers, so that you effectively have no valid data points. Simply use

    set datafile separator ','
    

    or, since 4.6.6 and 5.0.0

    set datafile separator comma
    

    and it works fine.

    0 讨论(0)
提交回复
热议问题