College of Engineering Logo Web Server Logs Student Server Logs Orange bar Main Page General Information Special Events Programs Research Student Information Computer Facility Outreach Xtreme Engineering Jobs Available

Gnuplot Data Files

Computer Facility University of Hawaii at Manoa
College of Engineering

Gnuplot uses data files for plotting discrete data. These data files are plain text files which contain numerical data. Comments can be included in file by placing a pound symbol (#) at the beginning of the line. Each line in the data file contains exactly one data point, and the numbers on each line must be separated by blank spaces. These delimit the columns in a data file.

For two-dimensional plots, each data point can have up to 4 columns. Normally, two columns are used to represent (x, y) pairs. If there are 3 columns, the third column represents the delta value for error bars. Similary, when there are 4 columns, the last two columns represent the low value and high value of y, respectively. You can also omit the x column, in which case Gnuplot will assign x values of 0, 1, 2,... for each successive point. Blank lines within the data files will cause the plot to be broken between those points.

For three-dimensional plots, each data point can have up to 3 columns. Normally, three columns are used to represent (x, y, z) triplets. The x and y columns may be omitted, using the first column for the z column, in which case Gnuplot will assign x and y values of 0, 1, 2,... for each successive point. Blank lines within data files in this case separates groups of y-coordinate points. data files. (With only the z component specified.)

The Gnuplot commands plot and splot use data files for data plots. See the sections in this tutorial pertaining to data plots for 2- and 3-dimensional plots.

Author: Ben Yoshino (ben@wiliki.eng.hawaii.edu)

Comments, Questions? | E-mail: webmaster@wiliki.eng.hawaii.edu


Last updated on Thursday, August %.1d, 2002
Copyright © 2001 University of Hawai`i, College of Engineering, Computer Facility
All rights reserved.