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

Plotting two-dimensional data files

Computer Facility University of Hawaii at Manoa
College of Engineering

Please read the section on data files for the format for data files mentioned here.

The syntax of the plot command for plotting a two-dimensional set of data is as follows:

plot {ranges} "datafile" {using data-format} {title "title text"} {style}
If several plots are to be plotted, subsequent data plots (or functions) can be specified, separated by commas. The optional sections are shown with braces. Note that only one set of ranges can be specified, as the subsequent plots (or data plots) use the same range. By default a data file's first and second columns are used as the X and Y values, respectively. A data file with two columns of data can be plotted using the following command:
plot "file.txt"

Error bar plots

For plots with error bars, the data file used also needs the information for the error bars. If only a third column is given, that column is used for the delta values of Y. If the third and fourth columns are specified, the columns are used for the low value for Y and high value for Y, respectively. In order to create plots with error bars, you will need to plot the data twice. Once to plot the data, and a second time to plot the error bars.

plot "fileerr.txt" with lines, "fileerr.txt" with errorbars

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.