-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot.tex
45 lines (37 loc) · 3.91 KB
/
plot.tex
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
\documentclass[tikz,border=1pt]{standalone}
\usepackage{tikz,pgfplots,forloop}
\begin{document}
\pgfplotsset{width=7cm,compat=1.3}
\newcount\tmp\tmp=0\loop\advance\tmp by 1\def\fim{10}
\def \sidea {4} \def \sideb {7} \def \sidec {10} \def \budget {100}
\def \grida {\sidea x\sidea}
\def \gridb {\sideb x\sideb}
\def \gridc {\sidec x\sidec}
\def \a {1c-999999.on.5000}\def\aname{Dynamic~\grida} \def \b {1c-999999.on.5000}\def\bname{Dynamic~\gridb} \def \c {1c-999999.on.5000} \def\cname{Dynamic~\gridc}
\def \f {f\number\tmp} \def \seed {0} \def \pula {1}
\begin{tikzpicture}
\pgfplotsset{scale only axis}
\begin{axis}[skip coords between index={0}{1}, axis y line*=left, xlabel=Probed points, ylabel=Variance]
% \begin{axis}[skip coords between index={0}{1}, axis y line*=left, xlabel=time (h), ylabel=variance]
% \addplot [each nth point={\pula}, no marks, blue, dashed, thick] table [header=false, x expr={\thisrowno{1}/3600000}, y index = {2}] {\f-\seed-\grid-\budget-\a.log};
\addplot [each nth point={\pula}, mark=square, mark repeat=10, mark options={solid}, blue] table [header=false, x expr=\coordindex, y index = {2}] {\f-\seed-\grida-\budget-\a.log}; \label{a}
% \addplot [each nth point={\pula}, no marks, black!30!green, dashed, thick] table [header=false, x expr={\thisrowno{1}/3600000}, y index = {2}] {\f-\seed-\grid-\budget-\b.log};
\addplot [each nth point={\pula}, mark=x, mark repeat=10, mark options={solid}, black!30!green] table [header=false, x expr=\coordindex, y index = {2}] {\f-\seed-\gridb-\budget-\b.log}; \label{b}
\addplot [each nth point={\pula}, mark=*, mark repeat=10, mark options={solid}, black!30!red] table [header=false, x expr=\coordindex, y index = {2}] {\f-\seed-\gridc-\budget-\c.log}; \label{c}
% \addplot [each nth point={\pula}, no marks, black, dashed, thick] table [header=false, x expr={\thisrowno{1}/3600000}, y index = {2}] {\f-\seed-\grid-\budget-\c.log};
% \addplot [each nth point={\pula}, mark=triangle, mark repeat=10, mark options={solid}, black] table [header=false, x expr={\thisrowno{1}/3600000}, y index = {3}] {\f-\seed-\grid-\budget-\c.log}; \label{c}
\end{axis}
\begin{axis}[legend style={at={(0.5,1.5)},anchor=north}, skip coords between index={0}{1}, axis y line*=right, axis x line=none, ylabel=Error] %, legend style={at={(0.5,1.05)},anchor=south}]
\addlegendimage{/pgfplots/refstyle=a}\addlegendentry{\aname variance}
\addplot [each nth point={\pula}, mark=square, mark repeat=10, mark options={solid}, blue, dotted, thick] table [header=false, x expr=\coordindex, y index = {3}] {\f-\seed-\grida-\budget-\a.log}; \addlegendentry{\aname error}
\addlegendimage{/pgfplots/refstyle=b}\addlegendentry{\bname variance}
\addplot [each nth point={\pula}, mark=x, mark repeat=10, mark options={solid}, black!30!green, dotted, thick] table [header=false, x expr=\coordindex, y index = {3}] {\f-\seed-\gridb-\budget-\b.log}; \addlegendentry{\bname error}
\addlegendimage{/pgfplots/refstyle=c}\addlegendentry{\cname variance}
\addplot [each nth point={\pula}, mark=*, mark repeat=10, mark options={solid}, black!30!red, dotted, thick] table [header=false, x expr=\coordindex, y index = {3}] {\f-\seed-\gridc-\budget-\c.log}; \addlegendentry{\cname error}
% \addlegendimage{/pgfplots/refstyle=c}\addlegendentry{\c best variance}
% \addplot [each nth point={\pula}, mark=triangle, mark repeat=10, mark options={solid}, black, dotted, thick] table [header=false, x expr={\thisrowno{1}/3600000}, y index = {4}] {\f-\seed-\grid-\budget-\c.log}; \addlegendentry{\c error}
\end{axis}
\node [above=8.5cm, align=flush center,text width=5cm] {\f, seed \seed, \grida, \gridb, budget \budget};
\end{tikzpicture}
\ifnum\tmp<\fim\repeat
\end{document}