\end{center \caption{A more fancy example.\end{minipage $ –> <IMG STYLE="" SRC="img2.png" ALT="% latex2html id marker 574 \framebox[\boxwidth]{ \begin{minipage{\fullboxwidth... ...center % \input{eg2 \end{center\caption{A more fancy example.\end{minipage"></DIV> </DIV>

<P> We have specified the plot to be 5 inches wide and 4 inches tall with the <TT>set size</TT> command. This is the size of the area used by the plot, <EM>including</EM> space for the labels. In the first example, this size was the default 5 inches by 3 inches. By specifying the scaling factors of 1 (or 5/5) and 1.3333 (or 4/3), we obtain the desired plot size.

<P> We have requested that the format used by the <I>x</I>- and <I>y</I>-axis tic mark labels be in L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X math mode. This makes the labels look a little better. The default is <code>set format xy "%g"</code>. The <code>%g</code> represents the general-purpose floating point formatting specification for the <TT>printf</TT> function in C. Any valid floating-point formatting specification, or L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X command, is allowed in the format.

<P> A title for the plot and labels for the axes were set up in the next three commands. Note that they are processed by L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X and so may have math mode and other symbols in them. The ylabel may have multiple lines, delineated with <code>\\</code>. The ylabel can be moved around with optional offset parameters (see <TT>set ylabel</TT> in the GNUPLOT manual). Typically, the ylabel needs to be moved to the left to avoid interfering with the left-hand side of the plot. Once these labels are set up, they will be used for all subsequent plot commands until they are changed. These labels are also supported by the other terminal types, but (of course) any L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X code in the string will not be interpreted. We have also defined the range of both <I>x</I> (now [0, 2<I>&#960;</I>]) and <I>y</I> (here [0, 1]).

<P> So far we have plotted one curve, <I>y</I> = sin(<I>x</I>), on one plot. In GNUPLOT, each <TT>plot</TT> command generates a new plot. If the output is to a screen, the screen is cleared. If to a printer, a new page is produced. In the <TT>latex</TT> case, a new picture is started. It is not likely that L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X users will want this to happen, so generally each plot has its own input file and is kept in a separate output (<TT>.tex</TT>) file for inclusion at different places in the document.

<P>

<HR>

</BODY> </HTML>


This document was generated on November 24, 2024 using texi2html 5.0.