set terminal latex
set output "eg3.tex"
set format xy "$%g$"
set title "This is another plot"
set xlabel "$x$ axis"
set ylabel "$y$ axis"
set key 15,-10
plot x with lines, "eg3.dat" with linespoints
Here you will see that the range was not specified. The
range
is determined automatically, unless specified by the user. In
this case, it is defined by the range of the data file
"eg3.dat". The function is plotted over the same range. If no
data files or
range are supplied, the default range of
is used. We have also moved the key to a different position. The
function
is plotted ``with lines'', which is the default plot
style for functions, and is shown here to illustrate the plot style
option. The data file eg3.dat is plotted with style linespoints, a style like lines that also plots a symbol at
each data point.
There is a style called points that only plots the symbols at
data points, and another called dots that plots a tiny dot for
each data point. The points and linespoints styles
produce a different point symbol for each curve on the plot (for up to
twelve symbols, after which they are re-used; see
Figure 7 for a complete list). The lines and linespoints styles use a different line style for each curve on the
plot (in this example the dots have different spacing). The
style impulses draws a perpendicular from each point to the
-axis. Finally, the errorbars style can draw error bars at
each data point (see the GNUPLOT manual).