Gnuplot - bad data on line 1

Discussion in 'Mac Programming' started by ellie:), Jan 16, 2010.

  1. macrumors newbie

    Joined:
    Jan 7, 2010
    #1
    Hi there,
    I am having a problem with Gnuplot.
    when I try to plot the graph, I got this error " bad data on line 1"

    here are the first few rows of my data:
    1 0.0193608
    2 0.089262
    3 0.0302174
    4 0
    5 0
    6 0
    7 0
    8 0
    9 0
    10 0
    11 -0.0302174
    12 -0.0892561
    13 -0.0192659
    14 0.109624
    15 0.0466765
    16 -0.0663904
    17 -0.0152822
    18 0.0355062
    19 0.0137621
    20 0
    21 0

    I tried plotting another data file which I just plotted one week ago, and I got this error again.. :confused:

    Thanks in advance~
     
  2. macrumors 6502a

    Joined:
    Jun 8, 2005
    Location:
    West-Europe
    #2
    Posting the original file and the command that you are using is much more useful that posting some data. There is nothing magic about a bunch of numbers. However, the difference between line endings (\n or \r or \r\n) and the delimiters (;,:\t) can make the difference between getting a nice plot or a bunch of errors.

    And are you sure you are using the same command as last week?
     

Share This Page