summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.legend.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.legend.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.legend.tex78
1 files changed, 78 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.legend.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.legend.tex
new file mode 100644
index 00000000000..81dc332cfa5
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.legend.tex
@@ -0,0 +1,78 @@
+\testfile{pgfplotstest.legend.tex}
+\testsection{Legends}
+\begingroup
+\testsubsection{Old-format legends with two backslashes as separator}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error]
+\manylogplotsnolegend
+\legend{one\\two\\three\\four\\five\\six\\}%
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{Using comma-separated-legends}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error]
+\manylogplotsnolegend
+\legend{one,two,three,four,five,six}%
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{testing legend columns}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=2]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=3]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+
+{
+\pgfplotsset{every axis legend/.append style={inner sep=0pt,nodes={inner sep=0pt}}}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=4]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+}
+
+{\pgfplotsset{every axis legend/.append style={at={(0.5,-0.2)},anchor=north}}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=6]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+}%
+
+{\pgfplotsset{every axis legend/.append style={at={(0.5,0.98)},anchor=north,inner sep=0pt}}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=-1]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+}%
+
+\testsubsection{``legend plot pos'' options}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend plot pos=left]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend plot pos=right]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend plot pos=none]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+\endgroup
+
+