\input{eg1}
in a center environment in a figure
environment. In following examples, I will enclose the figure in a box
to make it look a little better.
set terminal latex set output "eg1.tex" plot [-3.14:3.14] sin(x)
Note that GNUPLOT has drawn in the axes, labeled the tic marks for us, scaled the y axis automatically, and added a key in the upper-right-hand corner (this may be moved with the set key command).
This is the default line style for the LATEX driver. Because of the limited picture capabilities of LATEX, many dots are required to approximate drawing a solid line. This may overload the memory of many TEX implementations. There are other line types available that draw dotted lines and use much less memory. The EEPIC driver draws solid lines with much less memory usage.