summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.axispath.tex
blob: 757130e5958094a3680a2835d8b35bd6525db9e3 (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
\testfile{pgfplotstest.axispath.tex}
\testsection{Testing path commands inside of axis}
\testsubsection{log plot}
\begin{tikzpicture}
\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error]
\loglogtestplot

\draw (axis cs:9217,	3.261015e-06) -| (axis cs:4097,	1.207141e-05);

\node[pin=45:good!] at (axis cs:1023,	1.038865e-03) {};
\end{loglogaxis}
\end{tikzpicture}

\testsubsection{Linear plot}
\begin{tikzpicture}
\begin{axis}
\smallplotstest

\draw (axis cs:-1,0) -- (axis cs:1,1);

\node[font=\footnotesize,pin=45:{$(-0.25,0.0625)$}] at (axis cs:-0.25,	0.0625) {};
\end{axis}
\end{tikzpicture}

\testsection{Checking plot expression}
\begin{tikzpicture}
\begin{axis}[domain=1:4,ymin=0,ymax=3,enlargelimits]
\smallplotstest
\addlegendentry{$g(x)$}

\addplot (\x,{0.05*exp(\x)});
\addlegendentry{$f(x) = \frac{1}{20} \mathrm e^x$}
\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
\begin{axis}[ymin=0,ymax=4,enlargelimits]
\addplot plot[domain=2:4.5] (\x,{0.05*exp(\x)});
\addlegendentry{$f(x) = \frac{1}{20} \mathrm e^x$}
\end{axis}
\end{tikzpicture}