\documentclass[12pt,a4paper]{book}
\usepackage{pictex}
\usepackage{graphics}
\usepackage{citesort}
\usepackage{verbatim}

% **   Macros   **
\def\FastPiCTeX{F\kern-.30em\lower.5ex\hbox{A}\kern-.12emS\kern-.18em\lower-0.5ex\hbox{T}\PiCTeX}

\author{
Harald Martin Stau\ss, MD \\
Dept. of Physiology \\
Humboldt University - Charit\'e Berlin \\
Tucholskystr.~2 \\
10117 Berlin \\
Germany \\
e-mail: harald.stauss@rz.hu-berlin.de
}

\title{Generating Charts with \FastPiCTeX}
\date{\today}

\begin{document}
\maketitle

{
\setlength{\parindent}{0pt}
{\bf \FastPiCTeX:} H. M. Stau\ss, 1$^{st}$~edition, 1998

\vfill
\begin{center}
Dedicated to \\
the Free Software Foundation \\
 and all \TeX\ users
\end{center}

\vfill This manual was generated using \LaTeX\ and \PiCTeX. The
sources of the \FastPiCTeX\ program together with the \LaTeX\ sources
of this manual are freely available. The rules of the GNU public
license apply. The author would appreciate receiving picture postcards
of the home town of people who like this program.  }

\tableofcontents
\listoffigures
%\listoftables

\chapter{GNU general public license}
\begin{center}
Version 2, June 1991 \\
\vspace*{1em}
Copyright \copyright \ 1989, 1991 Free Software Foundation, Inc. \\
675 Mass Ave, Cambridge, MA 02139, USA \\
Everyone is permitted to copy and distribute verbatim copies \\
of this license document, but changing it is not allowed. \\
\end{center}

\section{Preamble}
  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

\section{Terms and conditions}
\begin{enumerate}
\setcounter{enumi}{-1}
\item This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

\item You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

\item You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
\begin{enumerate}
\item You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

\item You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

\item If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)
\end{enumerate}

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

\item You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
\begin{enumerate}
\item Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

\item Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

\item Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)
\end{enumerate}

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

\item You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

\item You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

\item Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

\item If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

\item If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

\item The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

\item If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

\begin{center}
NO WARRANTY
\end{center}

\item BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

\item IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

\begin{center}
END OF TERMS AND CONDITIONS
\end{center}
\end{enumerate}

\chapter{Introduction}
When I was writing my doctoral thesis in the late 80$^{th}$, I spent
my total savings and bought an IBM-compatible personal computer, that
was based on a 8080~microprocessor. Of course, I was using \LaTeX\ as
text-processing software. Inspired by my brother Bernhard, I decided to
use \PiCTeX\ to generate the charts for my thesis. However, I soon
recognized that the \TeX\ version that I used at this time (PC\TeX)
was not suitable to generate \PiCTeX\ charts, since I very often
received messages, such as: \\ 
\verb|! TeX capacity exceeded, sorry [main memory size = 65536 bytes]|

Finally, the excellent \TeX\ implementation from Eberhard Mattes
appeared and I could use Big\TeX\ to generate my theses.  Nowadays, I
use Linux as operating system together with the te\TeX\ implementation
and it seems that the memory management is no longer a limitation for
using \PiCTeX. However, the use of \PiCTeX\ for generating charts is
still quite time consuming, because the \PiCTeX\ macro language,
although very powerful, is somehow awkward. Pictures must be described
by the \PiCTeX\ programming language and usually a lot of debugging is
necessary to obtain the desired result. This may be the largest
disadvantage of \PiCTeX. Otherwise, \PiCTeX\ is very advanced and
offers nearly everything necessary to generate very nice charts of
scientific data material. In order to overcome the time consuming part
of generating the \PiCTeX\ code, I decided to write a
\PiCTeX-preprocessor that does all the nasty part in generating
\PiCTeX\ code. This preprocessor takes a very simple macro file as
input and generates an output file containing the \PiCTeX\ code. The
output file can then be included in a document by the \verb|\input|
command. As with most preprocessors there are some limitations of
\FastPiCTeX. First, only numerical diagrams based on data material can
be generated. Second, only a limited set of commands are implemented,
offering only basic instructions. Therefore, manually file tuning of
the \PiCTeX\ code is usually still necessary. However, a working
skeleton of the \PiCTeX\ file can easily be generated by \FastPiCTeX.

\chapter{Installation and Usage}
To use \FastPiCTeX\ you certainly need \TeX. \TeX\ was developed by
Donald E. Knuth. His \TeX book \cite{4} is the basis of all packages
based on the most advanced typesetting software available for almost
any computer platform. In addition to \TeX\ you also need \LaTeX\ that
was developed as an extension to \TeX\ by Leslie Lamport who has
written the original \LaTeX\ manual \cite{3}. In addition, you need
\PiCTeX\ that is described in \cite{1}. The \PiCTeX\ manual by the
author of \PiCTeX, Michael J. Wichura, is an indepth description of
the \PiCTeX\ system and is certainly worth to read. Therefore, it is
included as \verb|pictex.dvi| in the doc directory of this
distribution. In addition, a brief command summary of all \PiCTeX\
commands is available in the file \verb|pictexsum.dvi| that is also
included.

Installation of \FastPiCTeX\ is as simple as unpacking the archive,
generating the Makefile with Imake and running make.
\begin{verbatim}
tar -xzvf fastpictex-x.y.tar.gz
cd fastpictex-x.y/src
xmkmf
make
\end{verbatim}

Once you have generated the executable \verb.fastpictex., you are
ready to generate \PiCTeX\ code in just a few
seconds. \verb.fastpictex. is a command line program that accepts two
parameters: the input file name and the output file name. The input
file is a \FastPiCTeX\ macro file, while the output file is the
\PiCTeX\ code that can be included in a \LaTeX\ document. Thus,
running \FastPiCTeX\ is as simple as typing: 
\begin{center}
\verb.fastpictex file_in file_out.
\end{center}

As an example, consider the very simple input file
(\verb|bargraph.fpt|) that generates a bargraph with four columns and
standard-error bars:

\verbatiminput{bargraph.fpt}

To generate a \PiCTeX\ file that can be included in any \LaTeX\ file
(the \PiCTeX\ package must be included) run the command:
\begin{center}
\verb|fastpictex bargraph.fpt bargraph.ltx|
\end{center}

A \LaTeX\ document that includes the bargraph (see Fig.~\ref{bargraph})
generated by \FastPiCTeX\ could be:
\begin{verbatim}
\documentclass[12pt]{book}
\usepackage{pictex}
\begin{document}
This is a pretty nice bar graph: \\
\input bargraph.ltx
\end{document}
\end{verbatim}

\begin{figure}
\input bargraph.ltx
\caption[A bargraph]{\small \label{bargraph} This bargraph was
produced by \FastPiCTeX\ by only four lines of input code.}
\end{figure}

\chapter{The macro language}
The \FastPiCTeX\ macro language consists of a few commands that can be
used to design a chart. The series of comands that compose a chart are
generally written to a file using a text editor, such as emacs or
vi. A command always starts in the first column of a line. Following
the command word at least one whitespace character must be inserted
before the parameters for the command are added. The parameters for
the commands are also separated by whitspace characters and can
continue in subsequent lines. However, if several lines are used for
one command, then the subsequent lines must start with at least one
whitespace character (instead of with a command word). As an example,
consider the following macro for the line graph shown in
Fig.~\ref{linegraph}:

\verbatiminput{linegraph.fpt}

\begin{figure}
\input linegraph.ltx
\caption[A linegraph]{\small \label{linegraph} A linegraph.}
\end{figure}

In this example, the \verb.x. and \verb.y. commands are spread over
two lines. Note, that the second lines for these commands start with
whitespace characters. Whitespace characters can be blanks or
tabulators. 

It is also possible to design charts with more than one series of
data. For each series of data, commands must be provided as
demonstrated in the next example. The example consists of three series
of xy charts. The resulting chart is shown in
Fig.~\ref{xygraph}. Note, that the three data series are automatically
distinguished by different symbols (i.e. by filled circles, open
circles, and by diamonds).

\verbatiminput{xygraph.fpt}

\begin{figure}
\input xygraph.ltx
\caption[A XY-graph with three series]{\small \label{xygraph} A
XY-graph with three series.}
\end{figure}

In addition, it is possible to combine different graph types in one
chart. Consider an example, in which the data points of an XY-Graph
should be connected by lines. A macro file for such a chart
composition is shown in the next example (Fig.~\ref{mixgraph}).

\begin{verbatim}
type xy
x    1   2   3   4   5
y    9   12  15  17  19
dx   0.5 0.6 0.4 0.5 0.7
dy   0.8 0.9 1.2 2.0 2.4
type line
x    1   2   3   4   5
y    9   12  15  17  19
\end{verbatim}

\begin{figure}
\input mixgraph.ltx
\caption[A graph with different chart types]{\small \label{mixgraph} A
graph with different chart types.}
\end{figure}

If a chart that consists of several series is to be composed, it is
important to understand, how \FastPiCTeX\ handels the order of the
commands. If a command word occurs for the first time, the command
belongs to the first series. If the command word appears for a second
or third time, it belongs to the second or third series. Therefore,
the example that generated Fig.~\ref{mixgraph} could have also been
written as:
\begin{verbatim}
type xy
type line
x    1   2   3   4   5
x    1   2   3   4   5
y    9   12  15  17  19
y    9   12  15  17  19
dx   0.5 0.6 0.4 0.5 0.7
dy   0.8 0.9 1.2 2.0 2.4
\end{verbatim}


In the following sections of this chapter, the various commands are
described in detail. For each command, examples are given as to how to
use the commands.


\section{Comments, the \% command}
To add comments, use the command word \%. As an example, the macro
code for one of the former examples (Fig~\ref{mixgraph}) can be
written as:

\verbatiminput{mixgraph.fpt}

\section{The size command}
The size command allows to define the width and height of the
plot. The parameters of the size command are the width and the height
of the chart which must both be given in units of centimeters (cm). If
no size command is given, the width and height both default to
6~cm. The output of the following example is shown in
figure~\ref{size}.

\verbatiminput{size.fpt}

\begin{figure}
\input size.ltx
\caption[An example with a non-standard size]{\small \label{size}
An example with a non-standard size.}
\end{figure}

\section{The type command}
The type command defines what kind of chart should be generated. The
available chart types are:
\begin{itemize}
\item XY-graphs
\item line graphs
\item bar graphs
\end{itemize}
Please keep in mind, that you must enter a type command for every
series in your chart. It is \textbf{not} possible to define the
chart type once for all series!

\subsection{XY-Graphs}
To generate a XY-graph, simply use ``\verb|type xy|''. An example is
given in Fig.~\ref{xygraph}. 

\subsection{Line-Graphs}
To generate a line-graph, use ``\verb|type line|''. An example is
given in Fig.~\ref{linegraph}. 

\subsection{Bar-Graphs}
To generate a bar-graph, use the command ``\verb|type bar|''. An
example is given in Fig.~\ref{bargraph}. The x-coordinates of
bar-graphs always start at~1 and increase by steps of~1. Therefore,
the x~command for a bar graph may consist of only the letter~x and no
actual x-coordinates.

\section{The x command}
The x command is used to define the x-coordinates. A x~command is
required for every series in a chart. However, the actual
x~coordinates may be omitted (i.e. the x~command consists of only the
letter~x). In this case the x-values are assumed to start at~1 and
increase by steps of~1. For example, consider the following graph that
is composed of bar, line, and xy series (Fig.~\ref{x-command}):

\verbatiminput{x-command.fpt}

The bars and lines of the resulting graph (Fig.~\ref{x-command}) have their
x-coordinates at 1, 2, 3, and 4. These x-coordinates are automatically
defined by \FastPiCTeX. 

\begin{figure} 
\input x-command.ltx
\caption[An example without x-coordinates]{\small \label{x-command} An
example without x-coordinates.}
\end{figure}

\section{The xticlabels command}
The xticlabels command allows to define labels for the tics at the
x-axis. Examples are given in Fig.~\ref{xticlabels} that were created
by the \FastPiCTeX\ commands:
\verbatiminput{xticlabels1.fpt}
and
\verbatiminput{xticlabels2.fpt}

If the labels contain blanks, you may enclose the entire label in
quotes as demonstrated in on of the examples. One limitation is that it is
not possible to use \LaTeX\ formatting commands such as {\verb.\bf.} or
{\verb.\it.} in xticlabels.

\begin{center}
\begin{figure}
\small 
\input xticlabels1.ltx
\input xticlabels2.ltx
\caption[Examples with labels at the tics of the x-axis]{\small
\label{xticlabels} Examples with labels at the tics of the x-axis.}
\end{figure}
\end{center}

\section{The y command}
The y command is used to define the y-coordinates. This command is
required for every series in a graph. It is possible to add a string
(enclosed in doublequotes) directly (without any whitespace) after the
numbers for the y-values. This string will be printed on top of the
data point in the chart. This feature allows to add asterisks to
indicate that this data point is significant or to add other kind of
information to a specific data point. Examples are given in
Fig.~\ref{bargraph} and~\ref{asterisk}. The latter one was
produced by the following \FastPiCTeX\ commands:

\verbatiminput{asterisk.fpt}

\begin{center}
\begin{figure}
\small 
\input asterisk.ltx
\caption[An example giving extra information on data points]{\small
\label{asterisk} An example giving extra information on data points.}
\end{figure}
\end{center}

\section{The dx command}
The dx command can be used to define error bars in x-direction. For
example, if the standard errors are given, \FastPiCTeX\ draws
horizontal error bars extending to the left and to the right by
$\pm$~the standard errors. An example is given in Fig.~\ref{mixgraph}.

\section{The dy command}
The dy command can be used to define error bars in y-direction. For
example, if the standard errors are given, \FastPiCTeX\ draws vertical
error bars extending up- and downwards by $\pm$~the standard
errors. Examples are given in Figs.~\ref{bargraph}, \ref{mixgraph},
and \ref{x-command}.

\section{The heading command}
The heading command can be used to define a heading for a chart. The
heading is placed above the chart. Standard \LaTeX\ formatting
commands can be used as illustrated in the example given in
Fig.~\ref{heading}.

\verbatiminput{heading.fpt}

\begin{figure}
\input heading.ltx
\caption[A chart with a heading]{\small \label{heading} A chart with a
heading.}
\end{figure}

\section{The xlabel and ylabel commands}
These two commands can be used to enter a label to the x- and
y-axis. Like in the heading command, regular \LaTeX\ formatting
instructions can be included. If the y-axis label should be rotated by
90$^\circ$, the command ``\verb.\rotatebox{}{}.'' can be used. This
command is included in the graphics package distributed with most
\TeX\ and \LaTeX\ distributions. However, the ``\verb.\rotatebox{}{}.''
command uses special commands that can only be handeled by some
DVI-drivers, such as the DVIPS driver. An example using the
``\verb.\stack{}.'' command to write the y-axis label vertically is
shown in the next Figure (Fig.~\ref{axislabels}).

\verbatiminput{axislabels.fpt}

\begin{figure}
\input axislabels.ltx
\caption[A chart with a heading and labels at the axis]{\small
\label{axislabels} A chart with a heading and labels at the axis.}
\end{figure}

\section{The xgrid and ygrid commands}
If these commands are given, gridlines will be drawn in the x or y
direction respectively. The commands do not need any parameters. If
the xgrid or ygrid commands are not given, no gridlines will be
drawn. An example is given in Fig.~\ref{grids} that was generated by
the following commands:

\verbatiminput{grids.fpt}

\begin{figure}
\input grids.ltx
\caption[A chart with grid lines]{\small
\label{grids} A chart with grid lines.}
\end{figure}

\bibliographystyle{plain} 
\bibliography{fastpictex} 

\end{document}
