1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
% main=manual.tex
\section{Installation}
\subsection{Licensing}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A copy of the GNU General Public License can be found in the package file
\begin{lstlisting}
doc/latex/pgfplots/gpl-3.0.txt
\end{lstlisting}
You may also visit~\url{http://www.gnu.org/licenses}.
\subsection{Prerequisites}
\PGFPlots\ requires \PGF\ with \textbf{at least version~$2.0$}. It is used with
\begin{lstlisting}
\usepackage{pgfplots}
\end{lstlisting}
in your preamble (see section~\ref{sec:tex:dialects} for information about how to use it with Con{\TeX}t and plain \TeX). There are several ways how to teach \TeX\ where to find the files. Choose the option which fits your needs best.
\subsection{Installation in Windows}
Windows users often use Mik\TeX\ which downloads the latest stable package versions automatically. As far as I know, you do not need to install anything manually here.
\subsection{Assigning the \texttt{TEXINPUTS} Variable}
You can simply install \PGFPlots\ anywhere on your disc, for example into
\begin{lstlisting}
/foo/bar/pgfplots.
\end{lstlisting}
Then, you set the \texttt{TEXINPUTS} variable to
\begin{lstlisting}
TEXINPUTS=/foo/bar/pgfplots//:
\end{lstlisting}
The trailing~`\texttt{:}' tells \TeX\ to check the default search paths after \lstinline!/foo/bar/pgfplots!. The double slash~`\texttt{//}' tells \TeX\ to search all subdirectories.
If the \texttt{TEXINPUTS} variable already contains something, you can append the line above to the existing \texttt{TEXINPUTS} content.
Furthermore, you should set |TEXDOCS| as well,
\begin{lstlisting}
TEXDOCS=/foo/bar/pgfplots//:
\end{lstlisting}
so that the \TeX-documentation system finds the files |pgfplots.pdf| and |pgfplotstable.pdf| (on some systems, it is then enough to use |texdoc pgfplots|).
Please refer to your operating systems manual for how to set environment variables.
\subsection{Installation into a local \texttt{texmf}-directory}
Copy \PGFPlots\ to a local \texttt{texmf} directory like \lstinline!~/texmf! in your home directory. Then, install \PGFPlots\ into the subdirectory \lstinline!texmf/tex/generic/pgfplots! and run \lstinline!texhash!.
\subsection{Installation into a local TDS compliant \texttt{texmf}-directory}
A TDS conforming installation will use the same base directory as in the last section, but it requires to merge the contents of `\texttt{latex}' into `\texttt{texmf/tex/latex}'; the contents of `\texttt{generic}' to `\texttt{texmf/tex/generic}' and the contents of `\texttt{doc}' to `\texttt{texmf/doc}'.
Do not forget to run \lstinline!texhash!.
\subsection{If everything else fails...}
If \TeX\ still doesn't find your files, you can copy all \lstinline!.sty!-files into your current project's working directory.
Please refer to \url{http://www.ctan.org/installationadvice/} for more information about package installation.
\subsection{Restrictions for DVI-Viewers and \texttt{dvipdfm}}
\label{sec:drivers}%
\PGF\ is compatible with
\begin{itemize}
\item \lstinline!latex!/\lstinline!dvips!,
\item \lstinline!latex!/\lstinline!dvipdfm!,
\item \lstinline!pdflatex!,
\item $\vdots$
\end{itemize}
However, there are some restrictions: I don't know any DVI viewer which is capable of viewing the output of \PGF\ (and therefor \PGFPlots\ as well). After all, DVI has never been designed to draw something different than text and horizontal/vertical lines. You will need to view the postscript file or the pdf-file.
Furthermore, \PGF\ needs to know a \emph{driver} so that the DVI file can be converted to the desired output. Depending on your system, you need the following options:
\begin{itemize}
\item \lstinline!latex!/\lstinline!dvips! does not need anything special because \lstinline!dvips! is the default driver if you invoke \lstinline!latex!.
\item \lstinline!pdflatex! will also work directly because \lstinline!pdflatex! will be detected automatically.
\item \lstinline!latex!/\lstinline!dvipdfm! requires to use
\begin{lstlisting}
\def\pgfsysdriver{pgfsys-dvipdfm.def}
%\def\pgfsysdriver{pgfsys-pdftex.def}
%\def\pgfsysdriver{pgfsys-dvips.def}
\usepackage{pgfplots}.
\end{lstlisting}
The uncommented commands could be used to set other drivers explictly.
\end{itemize}
Please read the corresponding sections in~\cite[Section 7.2.1 and 7.2.2]{tikz} if you have further questions. These sections also contain limitations of particular drivers.
|