14.10.2014 Views

gnuplot documentation

gnuplot documentation

gnuplot documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

60 PLOT <strong>gnuplot</strong> 4.3 67<br />

The keyword filetype in controls the routine used to read the file, i.e., the format of the<br />

data. For a list of the supported file types, type show datafile binary filetypes. If no file type is<br />

given, the rule is that traditional <strong>gnuplot</strong> binary is assumed for splot if the binary keyword stands<br />

alone. In all other circumstances, for plot or when one of the keywords appears, a raw<br />

binary file is assumed whereby the keywords specify the binary format.<br />

General binary data files fall into two basic classes, and some files may be of both classes depending upon<br />

how they are treated. There is that class for which uniform sampling is assumed and point coordinates<br />

must be generated. This is the class for which full control via the keywords applies. For<br />

this class, the settings precedence is that command line parameters override in-file parameters, which<br />

override default settings. The other class is that set of files for which coordinate information is contained<br />

within the file or there is possibly a non-uniform sampling such as <strong>gnuplot</strong> binary.<br />

Other than for the unique data files such as <strong>gnuplot</strong> binary, one should think of binary data as conceptually<br />

the same as ASCII data. Each point has columns of information which are selected via the associated with using. When no format string is specified, <strong>gnuplot</strong> will retrieve a number of<br />

binary variables equal to the largest column given in the . For example, using 1:3 will<br />

result in three columns being read, of which the second will be ignored. There are default using lists<br />

based upon the typical number of parameters associated with a certain plot type. For example, with<br />

image has a default of using 1, while with rgbimage has a default of using 1:2:3. Note that the<br />

special characters for using representing point/line/index generally should not be used for binary data.<br />

There are keywords in that control this.<br />

60.2.2.1 Array Describes the sampling array dimensions associated with the binary file. The coordinates<br />

will be generated by <strong>gnuplot</strong>. A number must be specified for each dimension, thereby calling<br />

out the size of the array. For example, array=10x20 means the underlying sampling structure is twodimensional<br />

with 10 points along the first (x) dimension and 20 points along the second (y) dimension.<br />

A special "number", Inf, can be used to indicate that data should be read until the end of file. A colon<br />

can be used to separate the dimensions for multiple records. For example, array=25:35 indicates there<br />

are two one-dimensional records within the file. The colon behavior applies to the remaining keywords<br />

in this list for which it makes sense to be associated with individual records.<br />

Currently, syntax allows for up to three-dimensional arrays. However, no conventions have yet been<br />

made for handling three-dimensional coordinates.<br />

60.2.2.2 Record This keyword serves the same function as array, having the same syntax. However,<br />

record causes <strong>gnuplot</strong> to not generate coordinate information. This is for the case where such<br />

information may be included in one of the columns of the binary data file.<br />

60.2.2.3 Format The default binary format is a float. For more flexibility, the format can include<br />

details about variable sizes. For example, format="%uchar%int%float" associates an unsigned character<br />

with the first using column, an int with the second column and a float with the third column. If<br />

the number of size specifications is less than the greatest column number, the size is implicitly taken to<br />

be similar to the last given variable size.<br />

Furthermore, the format specification can include "discarded" terms via the * character. For example, to<br />

skip the middle column of the previous example, one could write format="%uchar%*int%float" and<br />

<strong>gnuplot</strong> will discard the middle integer. To list variable sizes, type show datafile binary datasizes.<br />

There are a group of names that are machine dependent along with their sizes in bytes for the particular<br />

compilation. There is also a group of names which attempt to be machine independent.<br />

60.2.2.4 Endian Often the endianess of binary data in the file does not agree with the endianess<br />

used by the platform on which <strong>gnuplot</strong> is running. Several words can direct <strong>gnuplot</strong> how to arrange<br />

bytes. For example endian=little means treat the binary file as having byte significance from least to<br />

greatest. The options are<br />

little:<br />

big:<br />

least significant to greatest significance<br />

greatest significance to least significance

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!