visualisation/cube.tex

changeset 24
8b4b014277fa
parent 23
b719a44b0b26
child 28
334fd47c482e
child 34
aa6129697116
equal deleted inserted replaced
23:b719a44b0b26 24:8b4b014277fa
1 \documentclass[tikz]{standalone} 1 \documentclass[tikz]{standalone}
2 \usepackage{pgfplots} 2 \usepackage{pgfplots}
3 \usepackage{tikz-3dplot} 3 \usepackage{tikz-3dplot}
4 \usepackage[svgnames]{xcolor}
4 \usepgfplotslibrary{colorbrewer} 5 \usepgfplotslibrary{colorbrewer}
5 6
6 \def\datapath{../res/} 7 \def\datapath{../res/}
7 8
8 \begin{document} 9 \begin{document}
20 \fi\fi\fi} 21 \fi\fi\fi}
21 22
22 \pgfplotsset{ 23 \pgfplotsset{
23 % forget plot = no legend 24 % forget plot = no legend
24 cube/.style = {thick, gray!50!black,forget plot}, 25 cube/.style = {thick, gray!50!black,forget plot},
25 iter/.style = {mark=x, red}, 26 onlyfront/.code = \pgfplotsset{x filter/.code={\onlyfront{\thisrow{face}}}},
27 onlyback/.code = \pgfplotsset{x filter/.code={\onlyback{\thisrow{face}}}},
26 data/.style = {mark=*, blue, only marks}, 28 data/.style = {mark=*, blue, only marks},
27 backdata/.style = {mark=*, blue!30!white, only marks, onlyback, forget plot}, 29 backdata/.style = {mark=*, blue!30!white, only marks, onlyback, forget plot},
28 backiter/.style = {mark=x, red!30!white, onlyback, forget plot}, 30 iter1/.style = {mark=x, red},
31 iter2/.style = {mark=star, BlueViolet},
32 iter3/.style = {mark=asterisk, purple},
33 backiter1/.style = {mark=x, red!30!white, onlyback, forget plot},
34 backiter2/.style = {mark=star, BlueViolet!30!white, onlyback, forget plot},
35 backiter3/.style = {mark=asterisk, purple!30!white, onlyback, forget plot},
29 origin/.style = {mark=o, green, only marks, thick}, 36 origin/.style = {mark=o, green, only marks, thick},
30 surfstyle/.style = {very nearly opaque, forget plot}, 37 surfstyle/.style = {very nearly opaque, forget plot},
31 onlyfront/.code = \pgfplotsset{x filter/.code={\onlyfront{\thisrow{face}}}},
32 onlyback/.code = \pgfplotsset{x filter/.code={\onlyback{\thisrow{face}}}},
33 legend style = { 38 legend style = {
34 inner sep = 0pt, 39 inner sep = 0pt,
35 outer xsep = 5pt, 40 outer xsep = 5pt,
36 outer ysep = 0pt, 41 outer ysep = 0pt,
37 legend cell align = left, 42 legend cell align = left,
59 %axis x line = none, 64 %axis x line = none,
60 %axis y line = none, 65 %axis y line = none,
61 %axis z line = none, 66 %axis z line = none,
62 legend columns = 3, 67 legend columns = 3,
63 legend style = { 68 legend style = {
64 at = {(0.5, 1.05)}, 69 at = {(0.5, 1.1)},
65 anchor = north, 70 anchor = north,
66 column sep = 1ex, 71 column sep = 1ex,
67 }, 72 },
73 mark size=1.5pt,
68 } 74 }
69 } 75 }
70 76
71 \begin{tikzpicture} 77 \begin{tikzpicture}
72 \begin{axis}[illustr3d] 78 \begin{axis}[illustr3d]
73 \addplot3[cube] coordinates {(0, 0, 0) (0, 1, 0) (0, 1, 1) }; 79 \addplot3[cube] coordinates {(0, 0, 0) (0, 1, 0) (0, 1, 1) };
74 \addplot3[cube] coordinates {(0, 1, 0) (1, 1, 0) }; 80 \addplot3[cube] coordinates {(0, 1, 0) (1, 1, 0) };
75 \addplot3[backdata] table[x=x,y=y,z=z] {\datapath/data.csv}; 81 \addplot3[backdata] table[x=x,y=y,z=z] {\datapath/data.csv};
76 \addplot3[backiter] table[x=x,y=y,z=z] {\datapath/log.txt}; 82 \addplot3[backiter1] table[x=x,y=y,z=z] {\datapath/x1_log.csv};
83 \addplot3[backiter2] table[x=x,y=y,z=z] {\datapath/x2_log.csv};
84 \addplot3[backiter3] table[x=x,y=y,z=z] {\datapath/x3_log.csv};
77 85
78 \addplot3[ 86 \addplot3[
79 surf, 87 surf,
80 mesh/ordering=x varies, 88 mesh/ordering=x varies,
81 mesh/cols=32, 89 mesh/cols=32,
121 \addlegendentry{Data} 129 \addlegendentry{Data}
122 130
123 \addplot3[origin,onlyfront] table[x=x,y=y,z=z] {\datapath/origin.csv}; 131 \addplot3[origin,onlyfront] table[x=x,y=y,z=z] {\datapath/origin.csv};
124 \addlegendentry{Origin} 132 \addlegendentry{Origin}
125 133
126 \addplot3[iter,onlyfront] table[x=x,y=y,z=z] {\datapath/log.txt}; 134 \addplot3[iter1,onlyfront] table[x=x,y=y,z=z] {\datapath/x1_log.csv};
127 \addlegendentry{Iterates} 135 \addlegendentry{Iterates 1}
136 \addplot3[iter2,onlyfront] table[x=x,y=y,z=z] {\datapath/x2_log.csv};
137 \addlegendentry{Iterates 2}
138 \addplot3[iter3,onlyfront] table[x=x,y=y,z=z] {\datapath/x3_log.csv};
139 \addlegendentry{Iterates 3}
128 \end{axis} 140 \end{axis}
129 \end{tikzpicture} 141 \end{tikzpicture}
130 142
131 \end{document} 143 \end{document}

mercurial