summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.enlargelimits.tex
blob: 055a47ac6dc6544bedeb48a148ce24361c3ee933 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
\testfile{pgfplotstest.enlargelimits.tex}
\testsection{Limit computation}
\testsubsection{User specified limits}
{\pgfplotsset{every axis/.append style={scaled ticks=false,enlargelimits=false}}
[scaled ticks = false,enlargelimits=false] in this section
\testsubsubsection{linear plot, unconstraint}
\begin{tikzpicture}
	\begin{axis}
		\addplot file{pgfplots.testplot};
	\end{axis}
\end{tikzpicture}

\testsubsubsection{linear plot, limited to $x \in [-20,20]$}
\begin{tikzpicture}
	\begin{axis}[xmin=-20,xmax=20]
		\addplot file{pgfplots.testplot};
	\end{axis}
\end{tikzpicture}

\testsubsubsection{linear plot, limited to $y \in [-12000,800]$}
\begin{tikzpicture}
	\begin{axis}[ymin=-12000,ymax=800]
		\addplot file{pgfplots.testplot};
	\end{axis}
\end{tikzpicture}

\testsubsubsection{linear plot, limited to $x \in [-20,20]; y \in [-12000,800]$}
\begin{tikzpicture}
	\begin{axis}[xmin=-20,xmax=20,ymin=-12000,ymax=800]
		\addplot file{pgfplots.testplot};
	\end{axis}
\end{tikzpicture}

\testsubsubsection{linear plot, limited to empty $x$-range}
\begin{tikzpicture}
	\begin{axis}[xmin=2000,xmax=20000]
		\addplot file{pgfplots.testplot};
	\end{axis}
\end{tikzpicture}



\testsubsection{Log plots}
Log--plots use the same code; they should work in the same way!

\testsubsubsection{log plot unconstraint}
\begin{tikzpicture}
	\begin{loglogaxis}
		\loglogtestplot
	\end{loglogaxis}
\end{tikzpicture}

\testsubsubsection{log plot limited to $x \in [10^3,5\cdot 10^5]$}
\begin{tikzpicture}
	\begin{loglogaxis}[xmin=1e3,xmax=5e5]
		\loglogtestplot
	\end{loglogaxis}
\end{tikzpicture}

\testsubsubsection{log plot limited to $y \in [10^{-5},2\cdot 10^{-3}]$}
\begin{tikzpicture}
	\begin{loglogaxis}[ymin=1e-5,ymax=2e-3]
		\loglogtestplot
	\end{loglogaxis}
\end{tikzpicture}
}

\testsubsection{Enlargelimits tests}
\testsubsubsection{enlargelimits=false, x limits provided}
\begin{tikzpicture}
\begin{axis}[%
	enlargelimits=false,
	xmin=0,xmax=1,
	xtick={-1.5,-1.25,...,1.5}]
\smallplotstest
\end{axis}
\end{tikzpicture}

\testsubsubsection{enlargelimits=false, no limits provided}
\begin{tikzpicture}
\begin{axis}[enlargelimits=false]
\smallplotstest
\end{axis}
\end{tikzpicture}

\testsubsubsection{enlargelimits=true, all limits provided $[-1,1]\times [-1,1]$}
\begin{tikzpicture}
\begin{axis}[enlargelimits=true,xmin=-1,xmax=1,ymin=-1,ymax=1]
\smallplotstest
\end{axis}
\end{tikzpicture}

\testsubsubsection{enlargelimits=0.5}
\begin{tikzpicture}
\begin{axis}[enlargelimits=0.5]
\smallplotstest
\end{axis}
\end{tikzpicture}