<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//en">

<!–Converted with LaTeX2HTML 2022 (Released January 1, 2022) –> <HTML lang="en"> <HEAD> <TITLE>Contents of Example 1:</TITLE>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0"> <META NAME="Generator" CONTENT="LaTeX2HTML v2022">

<LINK REL="STYLESHEET" HREF="tutorial.css">

<LINK REL="next" HREF="node4_mn.html"> <LINK REL="previous" HREF="node2_mn.html"> <LINK REL="up" HREF="node2_mn.html"> <LINK REL="next" HREF="node4_mn.html"> </HEAD>

<BODY bgcolor="#ffffff" text="#000000" link="#9944EE" vlink="#0000ff" alink="#00ff00">

<H4><A ID="SECTION00020010000000000000"> Example 1:</A> </H4> Here is a first example, producing a plot for this document. The GNUPLOT input file is given below, and the output appears as Figure&nbsp;<A HREF="node3_ct.html#eg1"><IMG ALT="[*]" SRC="crossref.png"></A>. The input file defines the output to be in L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X, gives a file name for the output, and plots <I>y</I> = <I>sin</I>(<I>x</I>) for <I>x</I> on <!– MATH [- π, π] –> [- <I>&#960;</I>, <I>&#960;</I>]. To produce the figure, I simply <code>\begin{center}\vbox{\input{eg1}
}\end{center}</code> in a <TT>center</TT> environment in a <TT>figure</TT> environment. In following examples, I will enclose the figure in a box to make it look a little better.

<P>

<PRE> set terminal latex set output "eg1.tex" plot [-3.14:3.14] sin(x) </PRE>

<P>

<DIV class="CENTER"><A ID="eg1"></A><A ID="81"></A> <TABLE> <CAPTION class="BOTTOM"><STRONG>Figure:</STRONG> A first example: <I>y</I> = <I>sin</I>(<I>x</I>)</CAPTION> <TR><TD><IMG STYLE="" SRC="img1.png" ALT="

\begin{figure}\begin{center}
\input{eg1}
\end{center}\end{figure}
"></TD></TR> </TABLE> </DIV>

<P> Note that GNUPLOT has drawn in the axes, labeled the tic marks for us, scaled the <I>y</I> axis automatically, and added a key in the upper-right-hand corner (this may be moved with the <TT>set key</TT> command, and removed with <TT>set nokey</TT>).

<P> This is the default line style for the L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X driver. Because of the limited picture capabilities of L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X, many dots are required to approximate drawing a solid line. This may overload the memory of many T<SMALL>E</SMALL>X 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.

<P>

<HR>

</BODY> </HTML>