summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex')
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex110
1 files changed, 60 insertions, 50 deletions
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex
index 4c79e5d593c..0196ebbe729 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex
@@ -22,7 +22,7 @@
\input{pgfplots.preamble.tex}
%\RequirePackage[german,english,francais]{babel}
-\def\matlabcolormaptext{This colormap is similar to one shipped with Matlab (tm) under a similar name.}
+\def\matlabcolormaptext{This colormap is similar to one shipped with Matlab (\textregistered) under a similar name.}
\IfFileExists{tikzlibraryspy.code.tex}{%
\usetikzlibrary{spy}
@@ -30,6 +30,8 @@
\message{ERROR: tikz SPY library NOT available. The manual will only compile partially.^^J}%
}%
+\usetikzlibrary{decorations.markings}
+
\usepgfplotslibrary{%
ternary,
smithchart,
@@ -131,83 +133,59 @@ However, note that this library requires at least \PGF\ version $2.00$. At the t
This release provides a lot of improvements which can be found in all detail in \texttt{ChangeLog} for interested readers. However, some attention is useful with respect to the following changes.
\subsubsection{New Optional Features}
+\PGFPlots\ has been written with backwards compatibility in mind: old \TeX\ files should compile without modifications and without changes in the appearance. However, new features occasionally lead to a different behavior. In such a case, \PGFPlots\ will deactivate the new feature\footnote{In case of broken backwards compatibility, we apologize -- and ask you to submit a bug report. We will take care of it.}.
+
+Any new features or bugfixes which cause backwards compatibility problems need to be activated \emph{manually} and \emph{explicitly}. In order to do so, you should use
+\begin{codeexample}[code only]
+\usepackage{pgfplots}
+\pgfplotsset{compat=1.5.1}
+\end{codeexample}
+\noindent in your preamble. This will configure the compatibility layer.
+
+Here is a list of changes introduced in recent versions of \PGFPlots:
\begin{enumerate}
- \item \PGFPlots\ 1.4 has fixed several smaller bugs which might produce differences of about $1$--$2\text{pt}$ compared to earlier releases. If you experience problems, use |\pgfplotsset{compat=1.3}|.
+ \item \PGFPlots\ 1.5.1 interpretes circle- and ellipse radii as \PGFPlots\ coordinates (older versions used \pgfname\ unit vectors which have no direct relation to \PGFPlots). In other words: starting with version 1.5.1, it is possible to write |\draw circle[radius=5]| inside of an axis. This requires |\pgfplotsset{compat=1.5.1}| or higher.
+
+ Without this compatibility setting, circles and ellipses use low--level canvas units of \pgfname\ as in earlier versions.
+
+ \item \PGFPlots\ 1.5 uses |log origin=0| as default (which influences logarithmic bar plots or stacked logarithmic plots). Older versions keep |log origin=infty|. This requires |\pgfplotsset{compat=1.5}| or higher.
+
+ \item \PGFPlots\ 1.4 has fixed several smaller bugs which might produce differences of about $1$--$2\text{pt}$ compared to earlier releases. This requires |\pgfplotsset{compat=1.4}| or higher.
\item \PGFPlots\ 1.3 comes with user interface improvements. The technical distinction between ``behavior options'' and ``style options'' of older versions is no longer necessary (although still fully supported).
- \item \PGFPlots\ 1.3 has a new feature which allows to \emph{move axis labels tight to tick labels} automatically.
+ This is always activated.
- Since this affects the spacing, it is not enabled be default.
+ \item \PGFPlots\ 1.3 has a new feature which allows to \emph{move axis labels tight to tick labels} automatically. This is strongly recommended. It requires |\pgfplotsset{compat=1.3}| or higher.
- Use
-\begin{codeexample}[code only]
-\usepackage{pgfplots}
-\pgfplotsset{compat=1.4}
-\end{codeexample}
- in your preamble to benefit from the improved spacing\footnote{The |compat=1.3| setting is necessary for new features which move axis labels around like reversed axis. However, \PGFPlots\ will still work as it does in earlier versions, your documents will remain the same if you don't set it explicitly.}.
- Take a look at the next page for the precise definition of |compat|.
+ Since this affects the spacing, it is not enabled be default.
\item \PGFPlots\ 1.3 now supports reversed axes. It is no longer necessary to use workarounds with negative units.
\pgfkeys{/pdflinks/search key prefixes in/.add={/pgfplots/,}{}}
Take a look at the |x dir=reverse| key.
- Existing workarounds will still function properly. Use |\pgfplotsset{compat=1.3}| together with |x dir=reverse| to switch to the new version.
+ Existing workarounds will still function properly. Use |\pgfplotsset{compat=1.3}| or higher together with |x dir=reverse| to switch to the new version.
\end{enumerate}
\subsubsection{Old Features Which May Need Attention}
\begin{enumerate}
\item The |scatter/classes| feature produces proper legends as of version 1.3. This may change the appearance of existing legends of plots with |scatter/classes|.
- \item Due to a small math bug in \PGF\ $2.00$, you \emph{can't} use the math expression `|-x^2|'. It is necessary to use `|0-x^2|' instead. The same holds for
- `|exp(-x^2)|'; use `|exp(0-x^2)|' instead.
-
- This will be fixed with \PGF\ $>2.00$.
-
\item Starting with \PGFPlots\ $1.1$, |\tikzstyle| should \emph{no longer be used} to set \PGFPlots\ options.
Although |\tikzstyle| is still supported for some older \PGFPlots\ options, you should replace any occurance of |\tikzstyle| with |\pgfplotsset{|\meta{style name}|/.style={|\meta{key-value-list}|}}| or the associated |/.append style| variant. See Section~\ref{sec:styles} for more detail.
\end{enumerate}
I apologize for any inconvenience caused by these changes.
-\begin{pgfplotskey}{compat=\mchoice{1.5,1.4,1.3,pre 1.3,default,newest} (initially default)}
+\begin{pgfplotskey}{compat=\mchoice{1.5.1,1.5,1.4,1.3,pre 1.3,default,newest} (initially default)}
The preamble configuration
\begin{codeexample}[code only]
\usepackage{pgfplots}
-\pgfplotsset{compat=1.4}
+\pgfplotsset{compat=1.5.1}
\end{codeexample}
allows to choose between backwards compatibility and most recent features.
- \PGFPlots\ version 1.5 with |compat=1.5| or |compat=newest| enables |log origin=0|. Older versions keep |log origin=infty|.
-
- \PGFPlots\ version 1.4 with |compat=1.4| or |compat=newest| fixes some small bugs related to axis scaling. This might lead to differences of $1$--$2\text{pt}$ compared to earlier versions. Use the choice |1.3| (or earlier) to disable these fixes.
-
- \PGFPlots\ version 1.3 with |compat=1.3| comes with new features which may lead to significiantly different spacings compared to earlier versions:
- \begin{enumerate}
- \item Version 1.3 comes with the |xlabel near ticks| feature which places (in this case $x$) axis labels ``near'' the tick labels, taking the size of tick labels into account.
-
- Older versions used |xlabel absolute|, i.e.\ an absolute distance between the axis and axis labels (now matter how large or small tick labels are).
-
- The initial setting \emph{keeps backwards compatibility}.
-
- You are encouraged to use
-\begin{codeexample}[code only]
-\usepackage{pgfplots}
-\pgfplotsset{compat=1.4}
-\end{codeexample}
- in your preamble.
-
- \item Version 1.3 fixes a bug with |anchor=south west| which occurred mainly for reversed axes: the anchors where upside--down. This is fixed now.
-
-
- If you have written some workaround and want to keep it going, use
-
- |\pgfplotsset{compat/anchors=pre 1.3}|\pgfmanualpdflabel{/pgfplots/compat/anchors}{}
-
- to disable the bug fix.
- \end{enumerate}
-
Occasionally, you might want to use different versions in the same document. Then, provide
\begin{codeexample}[code only]
\begin{figure}
@@ -216,11 +194,43 @@ I apologize for any inconvenience caused by these changes.
\caption{...}
\end{figure}
\end{codeexample}
- \noindent in order to restrict the compatibility setting to the actual context (in this case, the |figure| environment.
+ \noindent in order to restrict the compatibility setting to the actual context (in this case, the |figure| environment).
Use |\pgfplotsset{compat=default}| to restore the factory settings.
- The setting |\pgfplotsset{compat=newest}| will always use features of the most recent version. This might result in small changes in the document's appearance.
+ The setting |\pgfplotsset{compat=newest}| will always use features of the most recent version. This might result in small changes in the document's appearance. Note that it is generally a good idea to select the most recent version which is compatible with your document. This ensures that future changes will still be compatible with your document.
+
+ Although typically unnecessary, it is also possible to activate only selected changes and keep compatibility to older versions in general:
+ \begin{pgfplotskeylist}{compat/path replacement=\meta{version},compat/labels=\meta{version},compat/scaling=\meta{version},compat/general=\meta{version}}
+ Let us assume that we have a document with |\pgfplotsset{compat=1.3}| and you want to keep it this way.
+
+ In addition, you realized that version 1.5.1 supports circles and ellipses. Then, use
+\begin{codeexample}[]
+% preamble:
+\pgfplotsset{compat=1.3,compat/path replacement=1.5.1}
+\begin{tikzpicture}
+\begin{axis}[
+ extra x ticks={-2,2},
+ extra y ticks={-2,2},
+ extra tick style={grid=major}]
+ \addplot {x};
+ \draw (axis cs:0,0) circle[radius=2];
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+ All of these keys accept the possible values of the |compat| key.
+
+ The |compat/path replacement| key controls how radii of circles and ellipses are interpreted.
+
+ The |compat/labels| key controls how axis labels are aligned: either uses adjacent to ticks or with an absolute offset.
+
+ The |compat/scaling| key controls some bugfixes introduced in version 1.4: they might introduce slight scaling differences in order to improve the accuracy.
+
+ The |compat/general| key currently only activates |log origin|.
+
+ The detailed effects can be seen on the beginning of this section.
+ \end{pgfplotskeylist}
\end{pgfplotskey}
\subsection{The Team}