\documentclass[parskip=full,paper=landscape]{scrartcl}
\usepackage{latex-init}
\definecolor{unilj}{cmyk}{0.00, 0.94, 0.94, 0.06}
\definecolor{lso}{cmyk}{0.50, 0.00, 1.00, 0.00}
\hypersetup{pdftitle={Preizkusi merilnih diod}, pdfauthor={Laboratorij za sevanje in optiko FE UL}}
\begin{document}\pagestyle{empty}\centering\newgeometry{top=2cm, bottom=2cm, left=2cm, right=2cm}

\textsf{\large{Preizkusi merilnih diod}}\medskip

\begin{tikzpicture}\begin{axis}
[
width=\linewidth,
height=12cm,
grid=major,
xmin=0,
xmax=13,
% axis x line=middle,
xlabel={\textbf{\small{f}} \footnotesize{[GHz]}},
x label style={at={(0.5,0)}, yshift=-0.5cm, anchor=north},
% xtick={2.0, 2.1, 2.2, ..., 2.5},
xticklabel=\scriptsize{\pgfmathprintnumber[fixed, fixed zerofill, precision=1, use comma]{\tick}},
extra x ticks={0.05, 6.5, 8.0, 12.5},
extra x tick style={xticklabel=\empty, grid style={thick, black, dashed}},
ymin=36,
ymax=58,
% axis y line=middle,
% ytick={-3, 0, ..., 9},
yticklabel=\scriptsize{\pgfmathprintnumber[fixed, fixed zerofill, precision=0, use comma]{\tick}},
% extra y ticks={-3},
extra y tick style={xticklabel=\empty, grid style={thick, black, dashed}},
legend columns=7,
legend style={at={(0.5,1)}, yshift=0.5cm, anchor=south, cells={align=left, anchor=west}}
]

\addplot[opacity=0]{0}; \addlegendentry{\hspace{-16.5pt}\textbf{\small{P$_\textrm{AD}$}} \footnotesize{[dB]}\hspace{24pt}}

\addplot[forget plot=false,
restrict x to domain=7:12.9,
mark=none, mark options={scale=1, opacity=1},
thick, red, opacity=1, smooth]
table[col sep=comma, skip first n=1, x index=0, y index=2]
{20170526/lockin-test_20170526.csv};
\addlegendentry{\scriptsize{D1-20170526}\hspace{12pt}}

\addplot[forget plot=false,
restrict x to domain=0.05:6.5,
mark=none, mark options={scale=1, opacity=1},
thick, lso, opacity=1, smooth]
table[col sep=comma, skip first n=1, x index=0, y index=5, y expr={\thisrowno{1}+10}]
{20170530/lockin-test2_20170530.csv};
\addlegendentry{\scriptsize{D1-20170530}\hspace{12pt}}
\addplot[forget plot=true,
restrict x to domain=7:12.9,
mark=none, mark options={scale=1, opacity=1},
thick, lso, opacity=1, smooth]
table[col sep=comma, skip first n=1, x index=0, y index=5, y expr={\thisrowno{1}+10}]
{20170530/lockin-test2_20170530.csv};
% \addlegendentry{}

\addplot[forget plot=false,
restrict x to domain=7:12.9,
mark=none, mark options={scale=1, opacity=1},
thick, cyan, opacity=1, smooth]
table[col sep=comma, skip first n=1, x index=0, x expr={\thisrowno{0}/1000000}, y index=1]
{20170531/lockin-test3-300ms_20170531.csv};
\addlegendentry{\scriptsize{D1-20170531}\hspace{12pt}}

\addplot[forget plot=false,
% restrict x to domain=0:1,
mark=none, mark options={scale=1, opacity=1},
thick, blue, opacity=1, smooth, densely dotted]
table[col sep=comma, skip first n=1, x index=0, x expr={\thisrowno{0}/1000000}, y index=1]
{20170911/D1-lf_20170911.csv};
\addlegendentry{\scriptsize{D1-20170911}\hspace{12pt}}
\addplot[forget plot=true,
% restrict x to domain=0:1,
mark=none, mark options={scale=1, opacity=1},
thick, blue, opacity=1, smooth, densely dotted]
table[col sep=comma, skip first n=1, x index=0, x expr={\thisrowno{0}/1000000}, y index=1]
{20170911/D1-hf_20170911.csv};
% \addlegendentry{}

\addplot[forget plot=false,
% restrict x to domain=0:1,
mark=none, mark options={scale=1, opacity=1},
thick, magenta, opacity=1, smooth]
table[col sep=comma, skip first n=1, x index=0, x expr={\thisrowno{0}/1000000}, y index=1, y expr={\thisrowno{1}-10}]
{20170914/D1-hf_20170914.csv};
\addlegendentry{\scriptsize{D1-20170914}\hspace{12pt}}

\addplot[forget plot=false,
% restrict x to domain=0:1,
mark=none, mark options={scale=1, opacity=1},
thick, blue, opacity=1, smooth]
table[col sep=comma, skip first n=1, x index=0, x expr={\thisrowno{0}/1000000}, y index=1, y expr={\thisrowno{1}}]
{20170918/D1-hf_20170918.csv};
\addlegendentry{\scriptsize{D1-20170918}}

\end{axis}\end{tikzpicture}

\end{document}
