$ gnuplotwill start an interactive gnuplot session that is somehow similar to the usage of a terminal.
You can easily plot the data in the first file by typing:
gnuplot> plot "data.1"
This will produce an x-y plot of the data in file data.1, where gnuplot adjusts the - and
-axis
according to the data provided.
By default, the data points from the data file are plotted as little plus sings
+
.
You can change this behavior by appending with lines to the plot command:
gnuplot> plot "data.1" with lines
Additionally, gnuplot assumes the data to be provided as one or two columns in your data file.
If there is just one column in your file, gnuplot uses that data for the -axis. Otherwise,
if two columns of data are provided, the first column denotes the
- and the second the
-coordinate.
If your data file has more than two columns or your data is provided in another order, you can tell gnuplot
which of them should be used for which coordinates with the statement using.
gnuplot> plot "urbanareas.tsv" using 4:5 with linesThis will produce a plot of the data in urbanareas.tsv where the
In order to adjust the plot to your own needs, e.g. the range of the - or
-axis, colors, logarithmic scales and so on,
there exist several settings that can be set/unset using the commands set and unset
set xrange [0:1000] will set the range of the x-axis to the interval [0:1000] set yrange [-5:10] similar to xrange set logscale x turns on logarithmic scaling for the x axis set logscale y - "" - y axis unset xrange unsets a specified xrange, i.e. the range of the x-axis will be determined by the data unset logscale x unsets logarithmic scaling for the x axis
Consult the implemented help function within the gnuplot interactive shell by typing
gnuplot> helpor
gnuplot> help plottingAlternatively, you can visit the website
You can leave the interactive gnuplot session by typing
gnuplot> exit
Ronny Lorenz 2010-04-06