On Thursday, June 14, 2012 04:17:56 am pl...@pi... wrote:
> Hi,
>
> I have a csv file of about 2000 lines, which has some missing data, an
> extract :
>
> 25.12,141.99
> 25.14,141.91
> 25.16,141.71
> 25.18,
> 25.2,
> 25.22,
>
>
> I thought gnuplot was quite good at guessing formats but it does not
> shine with csv, so to get it to read the csv it used
> set datafile separator ","
>
> Now whenever it hits one of these lines with missing data it plots
> points way off the the right in a way I have not managed to understand.
> x values are in the range circa 6500
I suspect you have run into a very old, very strange, "feature" of gnuplot.
Fortunately, it has recently been banished in the CVS version.
Please read the section in the User Manual about "set datafile missing".
In particular please have a look at the figure and explanation on page
105 of the User Manual for 4.7:
http://gnuplot.sourceforge.net/gnuplot_cvs.pdf
> Am I just missing a trick ?
You didn't actually show us the plot command.
I am guessing that you neglected to provide a "using" specifier in the
plot command. As explained in the link above, this [used to] do bad things
if not all the input lines have the same number of data fields.
Switch to the current cvs version and/or add "using 1:2" in the plot command.
|