Debian Codegraph @

texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.tex

raw
1 %% ConTeXt file
2
3 \usemodule[pgfplots]
4 \pgfplotsset{compat=1.8}% <-- moves axis labels near ticklabels (respects tick label widths)
5
6 \starttext
7 Using Con{\TeX}t.
8
9 \starttikzpicture
10 \startloglogaxis
11 \addplot coordinates {
12 (1,1)
13 (16,16)
14 (32,64)
15 };
16 \stoploglogaxis
17 \stoptikzpicture
18
19 \starttikzpicture
20 \startloglogaxis[
21 xlabel=Cost,
22 ylabel=Error]
23 \addplot coordinates {
24 (5, 8.31160034e-02)
25 (17, 2.54685628e-02)
26 (49, 7.40715288e-03)
27 (129, 2.10192154e-03)
28 (321, 5.87352989e-04)
29 (769, 1.62269942e-04)
30 (1793, 4.44248889e-05)
31 (4097, 1.20714122e-05)
32 (9217, 3.26101452e-06)
33 };
34 \addplot coordinates {
35 (7, 8.47178381e-02)
36 (31, 3.04409349e-02)
37 (111, 1.02214539e-02)
38 (351, 3.30346265e-03)
39 (1023, 1.03886535e-03)
40 (2815, 3.19646457e-04)
41 (7423, 9.65789766e-05)
42 (18943, 2.87339125e-05)
43 (47103, 8.43749881e-06)
44 };
45 \legend{Case 1,Case 2}
46 \stoploglogaxis
47 \stoptikzpicture
48 \stoptext