From: Zack S. <za...@fn...> - 2005-03-16 22:31:10
|
I have been using gnuplot 3.7 patchlevel 3 on a linux system recently, but I see that this bug still exists in the v. 4.0 documentation and source code. You specify that > splot "filename" binary will load a binary file of the format: <N+1> y0 y1 ... yN x0 z00 z01 ... z0N x1 z10 z11 ... z1N etc. This is not correct. The actual format appears to be: <N> x0 x1 ... xN y0 z00 z01 ... z0N y1 z10 z11 ... z1N etc. i.e. a) you should specify that the lines have N z-components, rather than being N+1 single-precision numbers long. b) the x and y axes are swapped vs. the specification. If you use N+1 instead of N for your 1st entry, the file will not load. You can confirm the second bug by creating a test file whose data values only change with y (or x), and look at the resulting plot. A temporary fix for people who missed the axis-swapping is to just fix the first number to be <N> and use: splot "filename" binary using ($2):($1):3 Please update the documentation to correct this. If this is an unexpected correction, then I would request that you change the documented specification rather than alter the code, as binary data files are unpleasant to rewrite. Aside: Note, that the example binary files are generated by outputting <N> as the first number. Looking at the source code is how I finally identified the first bug. Creating a simple test file is how I identified the second. Zack Sullivan Fermi National Accelerator Laboratory |