summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.logplotenv.tex
blob: f2bd4e6b2a156b2d17023fb95469900433ca0a73 (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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
\testfile{pgfplotstest.logplotenv.tex}

\testsection{Default options log plot}
\testsubsection{Default size}
\begin{tikzpicture}
\begin{loglogaxis}
\loglogtestplot
\end{loglogaxis}
\end{tikzpicture}

\testsubsection{Small size}
\begin{tikzpicture}
\begin{loglogaxis}[width=6cm]
\loglogtestplot
\end{loglogaxis}
\end{tikzpicture}
%
\begin{tikzpicture}
\begin{loglogaxis}[width=6cm]
\addplot plot coordinates {
	(5,	8.311600e-03)
	(9217,	3.261015e-07)
};
\end{loglogaxis}
\end{tikzpicture}

\begin{tikzpicture}
\begin{loglogaxis}[width=6cm,ytick={1.0e0,1e-2,1e-4}]
\addplot plot coordinates {
	(5,	1.1e-00)
	(9217,	1e-05)
};
\end{loglogaxis}
\end{tikzpicture}

\testsubsection{Very small size}
\begin{tikzpicture}
\begin{loglogaxis}[width=4cm]
\loglogtestplot
\end{loglogaxis}
\end{tikzpicture}

\testsubsection{Large size}
\begin{tikzpicture}
\begin{loglogaxis}[width=\linewidth]
\loglogtestplot
\end{loglogaxis}
\end{tikzpicture}

\testsubsection{Large size; large range}
\begin{tikzpicture}
\begin{loglogaxis}[width=\linewidth]
\addplot coordinates {
	(1e0,1e12)
	(1e16,1e-12)
};
\end{loglogaxis}
\end{tikzpicture}


\testsubsection{Extremely small y range for log plot} 
\testsubsubsection{Without extra ticks, enlargelimits=false}
\begin{tikzpicture}
\begin{loglogaxis}[
	enlargelimits=false,
]
\addplot coordinates {
	(1e0,1.5e-4)
	(1e24,2e-3)
};
\end{loglogaxis}
\end{tikzpicture}

\testsubsubsection{With extra ticks, enlargelimits=false}
extra y ticks=\{2e-4,3e-4,4e-4,5e-4,6e-4,7e-4,8e-4,9e-4,1.2e-3\}

\begin{tikzpicture}
\begin{loglogaxis}[
	enlargelimits=false,
	extra y ticks={2e-4,3e-4,4e-4,5e-4,6e-4,7e-4,8e-4,9e-4,1.2e-3},
]
\addplot coordinates {
	(1e0,1.5e-4)
	(1e24,2e-3)
};
\end{loglogaxis}
\end{tikzpicture}

\testsection{Semilogy plot}
\begin{tikzpicture}
	\begin{semilogyaxis}[xlabel=Index,ylabel=Value]
	\addplot[color=blue,mark=*] plot coordinates {
		(1,8)
		(2,16)
		(3,32)
		(4,64)
		(5,128)
		(6,256)
		(7,512)
	};
	\end{semilogyaxis}
\end{tikzpicture}

\testsection{Semilogx plot}
\begin{tikzpicture}
	\begin{semilogxaxis}[xlabel=Index,ylabel=Value]
	\addplot[color=blue,mark=*] plot coordinates {
		(8,1)
		(16,2)
		(32,3)
		(64,4)
		(128,5)
		(256,6)
		(512,7)
	};
	\end{semilogxaxis}
\end{tikzpicture}

\testsubsection{Extra ticks}
Options:

extra x ticks=\{6e0,9e0,2e1,3e1,4e1,5e2,6e2,7e2,8e2,9e2\},

extra x tick style=\{/pgf/number format/sci subscript,font=footnotesize\},

\begin{tikzpicture}
	\begin{semilogxaxis}[xlabel=Index,ylabel=Value,
		width=\linewidth,
		extra x ticks={6e0,9e0,2e1,3e1,4e1,5e2,6e2,7e2,8e2,9e2},
		extra x tick style={/pgf/number format/sci subscript,font=\footnotesize},
	]
	\addplot[color=blue,mark=*] plot coordinates {
		(8,1)
		(16,2)
		(32,3)
		(64,4)
		(128,5)
		(256,6)
		(512,7)
	};
	\end{semilogxaxis}
\end{tikzpicture}