Probably most of the gnuplot lovers in a scientific field use this program to draw a graph of some calculated results or experimental data. They see their results on their monitor, make some corrections, comparison of the calculated result with the experimental data, and so on. If it seems fine, the figure is saved in a postscript format and send it to a printer, otherwise an EPS file is included in a TeX document... 
What is the format which gnuplot can recognize ? In a data file, the data columns are separated by a whitespace or tab. If a line begins with "#", this line is ignored. Generally gnuplot can read any data format if one specifies the format. See gnuplot help "using".
For example, if you have twodimensional data, one line contains a pair of X and Y values, like the example above. If X or Y values have uncertainties, you need an extra column to give the errors. The order of columns is not important because you can specify which column is used for X or Y data. If the first column is the X data, and the second is the Y data, use using option as:
There are two ways to make an errorbar for the Y value. The first one is that the Y value has uncertainties of plus/minus Z. The second one is that the Y value has a range [Z1,Z2]. In this case the lengths of the error bars below and above Y value are different. The former needs three columns, and the latter needs four columns.
To plot those data,
one needs the using option. The number of data column required for data plotting depend on a kind of figure, which is summarized below.
Three dimensional data are specified by (X,Y,Z). In the default, it represents a point in a 3dimensional space. When one uses with lines option to draw lines, gnuplot shows 3dim. lines or surfaces depending on a data format. The following example contains 4 blocks data, which are separated by one blank line. The number of (X,Y) pairs are different for the each data block. In such a case, gnuplot does not draw a surface but 3dim. lines.
Now, if the number of (X,Y) pairs is the same:
The surface grid appears. Although the Y values (second column) in the each block of this example are the same, gnuplot also draws the surface grid even if the Y values are different (but the number of data points are the same.) Such data are treated as the grid data. When your data are the grid data, gnuplot can draw a contour map, or hidden line processing can be done. The next is a simple test  the Y values in the last block are doubled (changed from Y=5 to Y=10). If you want to remove the surfacegrid but your blocks contain the same number of data point, separate the each block by two blank lines.
The matrix data format is an alternative way to give 3dim. data. When X and Y values (XY grid) are fixed, the matrix format is more convenient. In this format, raw is the direction of X, and column is Y.
To plot this data, use matrix . When the data are represented by the matrix format, the X and Y coordinates are the index of row and column. In this case the X range is [0:3] and the Y range is [0:5]. If you want to change those number, use the set {xy}tics command. The next shows how to change the X range from [0:2] to [100:300].
