next up previous contents index
Next: Array Up: Data Previous: Binary   Contents   Index


Binary general

General binary data in which format information is not necessarily part of the file can be read by giving further details about the file format at the command line. Although the syntax is slightly arcane to the casual user, general binary is particularly useful for application programs using gnuplot and sending large amounts of data.

Syntax:

     plot '<file_name>' {binary <binary list>} ...
     splot '<file_name>' {binary <binary list>} ...

General binary format is activated by keywords in 5#5binary list6#6 pertaining to information about file structure, i.e., array, record, format or filetype. Otherwise, matrix binary format is assumed. (See binary matrix (p. [*]) for more details.)

There are some standard file types that may be read for which details about the binary format may be extracted automatically. (Type show datafile binary at the command line for a list.) Otherwise, details must be specified at the command line or set in the defaults. Keywords are described below.

The keyword filetype in 5#5binary list6#6 controls the routine used to read the file, i.e., the format of the data. For a list of the supported file types, type show datafile binary filetypes. If no file type is given, the rule is that traditional gnuplot binary is assumed for splot if the binary keyword stands alone. In all other circumstances, for plot or when one of the 5#5binary list6#6 keywords appears, a raw binary file is assumed whereby the keywords specify the binary format.

General binary data files fall into two basic classes, and some files may be of both classes depending upon how they are treated. There is that class for which uniform sampling is assumed and point coordinates must be generated. This is the class for which full control via the 5#5binary list6#6 keywords applies. For this class, the settings precedence is that command line parameters override in-file parameters, which override default settings. The other class is that set of files for which coordinate information is contained within the file or there is possibly a non-uniform sampling such as gnuplot binary.

Other than for the unique data files such as gnuplot binary, one should think of binary data as conceptually the same as ASCII data. Each point has columns of information which are selected via the 5#5using list6#6 associated with using. When no format string is specified, gnuplot will retrieve a number of binary variables equal to the largest column given in the 5#5using list6#6. For example, using 1:3 will result in three columns being read, of which the second will be ignored. There are default using lists based upon the typical number of parameters associated with a certain plot type. For example, with image has a default of using 1, while with rgbimage has a default of using 1:2:3. Note that the special characters for using representing point/line/index generally should not be used for binary data. There are keywords in 5#5binary list6#6 that control this.


Subsections
next up previous contents index
Next: Array Up: Data Previous: Binary   Contents   Index
Ethan Merritt 2007-03-03