Credits | Overview | Plotting Styles | Commands | Terminals
--- | --- | --- | --- | ---

## binary

BINARY DATA FILES:

It is necessary to provide the keyword binary after the filename. Adequate details of the file format must be given on the command line or extracted from the file itself for a supported binary filetype. In particular, there are two structures for binary files, binary matrix format and binary general format.

The binary matrix format contains a two dimensional array of 32 bit IEEE float values plus an additional column and row of coordinate values. In the using specifier of a plot command, column 1 refers to the matrix row coordinate, column 2 refers to the matrix column coordinate, and column 3 refers to the value stored in the array at those coordinates.

The binary general format contains an arbitrary number of columns for which information must be specified at the command line. For example, array, record, format and using can indicate the size, format and dimension of data. There are a variety of useful commands for skipping file headers and changing endianess. There are a set of commands for positioning and translating data since often coordinates are not part of the file when uniform sampling is inherent in the data. Unlike reading from a text or matrix binary file, general binary does not treat the generated columns as 1, 2 or 3 in the using list. Instead column 1 refers to column 1 of the file, or as specified in the format list.

There are global default settings for the various binary options which may be set using the same syntax as the options when used as part of the (s)plot <filename> binary ... command. This syntax is set datafile binary .... The general rule is that common command-line specified parameters override file-extracted parameters which override default parameters.

Binary matrix is the default binary format when no keywords specific to binary general are given, i.e., array, record, format, filetype.

General binary data can be entered at the command line via the special file name '-'. However, this is intended for use through a pipe where programs can exchange binary data, not for keyboards. There is no "end of record" character for binary data. Gnuplot continues reading from a pipe until it has read the number of points declared in the array qualifier. See binary matrix or binary general for more details.

The index keyword is not supported, since the file format allows only one surface per file. The every and using specifiers are supported. using operates as if the data were read in the above triplet form. Binary File Splot Demo.

Subtopics

- general
- array
- record
- skip

- format
- blank
- endian
- filetype

- keywords