|
From: Ethan M. <merritt@u.washington.edu> - 2008-01-31 07:16:02
|
On Wednesday 30 January 2008 12:42, Ethan Merritt wrote:
> I help is needed from someone more familiar with the binary data modes.
> Anyone care to take over this bug report?
The following one-liner makes your test case work.
However, I am *not* applying this to CVS because I just don't understand
the code well enough. The binary read code at this point is not parallel
to the ascii input code, which simply does ++df_datum as it goes.
Why is this different? Is it correct? Will it break other things?
I don't know.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- gnuplot/src/datafile.c 2008-01-25 12:59:41.000000000 -0800
+++ gnuplot-cvs/src/datafile.c 2008-01-30 23:01:30.000000000 -0800
@@ -4937,7 +4937,7 @@
}
}
} else { /* Not matrix file, general binray. */
- df_datum = point_count;
+ df_datum = point_count+1; /* EAM DEBUG */
if (i != df_no_bin_cols) {
if (feof(data_fp)) {
if (i != 0)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> On Wednesday 30 January 2008 12:15, Ralf Juengling wrote:
> >
> > Here you go. The binary data is in intel pentium endianess
> > (whatever that is).
>
> Thanks. So far as I can tell from a quick test, the problem is
> not specific to histograms. Any other plot type also gets incorrect
> x coordinates when using the binary read command on that data file.
> If I dump the contents after reading them in, I get this:
>
> gnuplot> set style data linespoints
> gnuplot> plot "histdata.bin" binary array=1:8 format="%int" using 1
> gnuplot> set table
> gnuplot> replot
>
> # Curve 0 of 1, 7 points
> # Curve title: ""histdata.bin" binary array=1:8 format="%int" using 1"
> # x y type
> 0 102 i
> 0 42 i
> 1 38 i
> 2 28 i
> 3 26 i
> 4 108 i
> 5 156 i
>
> Can you confirm this on your setup?
> The thing is, I wrote the histogram code so I could probably fix it
> there if necessary. But I am largely unfamiliar with the binary input
> code, and don't use it much myself. So I don't know exactly what the
> issue might be. Surely if it returns the wrong x coordinate in general,
> someone would have noticed by now? But maybe not. Or maybe you have
> hit a special case of some sort, though I don't know what it might be.
>
>
--
Ethan A Merritt Courier Deliveries: 1959 NE Pacific
Dept of Biochemistry
Health Sciences Building
University of Washington - Seattle WA 98195-7742
|