|
div>
|
The data files available for you to download will be in gzipped .csv format. To make these suitable for using with Gnuplot, you should:
Gnuplot allows you to create many different types of plots for your data. In this document, we only describe how to create a very basic plot - we encourage you to experiment, and to find more sophisticated ways of displaying your data.
In this section, we describe some basic gnuplot commands that you will use over and over again. To learn more gnuplot commands or advanced options of the commands listed here, you should consult the Gnuplot Manual.
plot "data000001.csv" using 4:6
with points, "data000002.csv" using 4:6 with points
This plots the fourth (x-axis) and sixth (y-axis) columns of the
datafiles data000001.csv and data000002.csv using large dots to represent
the data points. The two datafiles will be represented in different
colours. (Actually, the expression
with points can be
omitted since it is the default value.)
plot [0:100] [10:20] "data000001.csv" using 1:2 title "Distance vs Time" with dots
This plots the first two columns of the datafile data000001.csv within
the x-range (0,100) and y-range (10,20) using small dots to represent
the data points. "Distance vs Time" appears as the title on the plot.
set origin 0.1, 0.1
This command places the origin of the plot at screen position (0.1,0.1),
where (0,0) specifies the bottom left corner of the window, and (1,1)
specifies the top right corner of the window.
set xlabel "time"
This command labels the x axis "time". The equivalent
set command for the y
axis is set ylabel "time"
set xrange [0:100]
This command limits the x axis range of the plot to (0,100). The
equivalent set command for
the y axis is set yrange
[0:100]
set logscale x
This command enables logscaling on the x axis.
set logscale y is the
equivalent command for the y axis, and
set nologscale disables
logscaling.
set terminal gif
This command enables the user to make a GIF version of their plot, by
redirecting the subsequent plotting commands to a driver that makes a GIF
file. You would use the set
terminal command for generating your plot in a format that can
be printed out or displayed on the web (for example). Many different
terminal settings are supported (refer to the
Gnuplot manual for
more details). Other set
terminal commands you might find useful include
set terminal postscript
and set terminal png
(Portable Network Graphics format).
The Gnuplot manual at http://www.ucc.ie/gnuplot/gnuplot.html should provide the answer to most questions. However, you might also like to refer to the following Gnuplot references on the web:
©
Swinburne
Copyright and disclaimer information
Maintained by: Rebecca Allen
(rebeccaallen@swin.edu.au)
Authorised by: Prof. Jean Brodie (jbrodie@swin.edu.au)
Monday, 19-Nov-2007 11:20:02 AEDT