Say I have a binary file which has the following format: 4*sizeof(double), 4*sizeof(size_t), (Ny*Nx)*dizeof(double).
The first 4 doubles and the 4 size_ts are metainformation about the file. The rest is data I want to plot with gnuplot.
Right now I have to convert the file to another one without the header to plot using the command:
plot "convertedfile.data" binary format='%double' array=(Ny, Nx) u 1 w image
Q: Is there any way to tell gnuplot to ignore the starting N bytes of the binary file and then plot the rest as if its a matrix?
You can skip some bytes at the beginning with skip
plot "convertedfile.data" binary skip=16 format='%double' array=(Ny, Nx) u 1 w image
will skip the first 16 bytes of the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With