summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.legend.tex
blob: 81dc332cfa52e0c90a258633e90f4e5673f6626e (plain)
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
\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