2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-25 22:38:04 +02:00
LaTeX-examples/tikz/validation-curve/validation-curve.tex

57 lines
2.1 KiB
TeX
Raw Normal View History

2017-04-30 22:54:37 +02:00
\documentclass[border=2pt]{standalone}
2017-04-22 11:35:38 +02:00
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
\usepackage[margin=2.5cm]{geometry} %layout
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.13}
\begin{document}
2017-04-30 22:54:37 +02:00
\definecolor{c1}{HTML}{0072B2}
\definecolor{c2}{HTML}{009E73}
\definecolor{c3}{HTML}{CB0000}
2017-04-22 11:35:38 +02:00
\begin{tikzpicture}
2017-04-30 22:54:37 +02:00
\pgfplotsset{
scale only axis,
% scaled x ticks=base 10:3,
xmin=0, xmax=171,
width=15cm, height=8cm, % size of the image
}
2017-04-22 11:35:38 +02:00
\begin{axis}[
2017-04-30 22:54:37 +02:00
axis y line*=left,
2017-04-22 11:35:38 +02:00
ymin=0.15,
% ymax=26000,
grid = major,
grid style={dashed, gray!30},
2017-04-30 22:54:37 +02:00
ylabel=validation accuracy,
legend style={at={(0.5,0.1)},anchor=south},
% ylabel style={at={(0,1.0)} },
2017-04-22 11:35:38 +02:00
xlabel=epoch,
2017-04-30 22:54:37 +02:00
% legend style={at={(0.3,0.2)}, anchor=north},
% legend cell align=right,
2017-04-22 11:35:38 +02:00
xticklabel style=
{/pgf/number format/1000 sep=,rotate=60,anchor=east,font=\scriptsize},
]
2017-04-30 22:54:37 +02:00
\addplot[thick, c1, mark=., densely dashed] table [x=epoch, y=max_acc, col sep=comma] {baseline_cifar_test_acc.csv};\label{plot_one}\addlegendentry{maximum validation accuracy}
\addplot[thick, c2, mark=.] table [x=epoch,y=min_acc, col sep=comma] {baseline_cifar_test_acc.csv};\label{plot_two}\addlegendentry{minimum validation accuracy}
2017-04-22 11:35:38 +02:00
\end{axis}
2017-04-30 22:54:37 +02:00
\begin{axis}[
axis y line*=right,
axis x line=none,
% xmin=0,
% xmax=171,
% ymin=0, ymax=100,
ylabel=loss,
legend style={at={(0.5,0.1)},anchor=south},
y dir=reverse
]
\addlegendimage{thick, c1, mark=., densely dashed}\addlegendentry{maximum validation accuracy}
\addlegendimage{thick, c2, mark=.}\addlegendentry{minimum validation accuracy}
\addplot[thick, c3, mark=., dotted] table [x=epoch,y=mean_loss, col sep=comma] {baseline_cifar_test_acc.csv};
\addlegendentry{mean loss}
\end{axis}
\end{tikzpicture}
2017-04-22 11:35:38 +02:00
\end{document}