\documentclass[border=1mm]{standalone}

\usepackage{cmap}
\usepackage[cp1250]{inputenc}	
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage{tikz}
\usepackage{float}
\usepackage{siunitx}
\usepackage{amsmath}
\usepackage{upgreek}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
\usepgfplotslibrary{units}
% \makeatletter
%\pgfplotsset{
%  unit code/.code 2 args=
%    \begingroup
%    \protected@edef\x{\endgroup\si{#2}}\x
%} 
%\makeatother

\pgfkeys{%
  /tikz/on layer/.code={
    \pgfonlayer{#1}\begingroup
    \aftergroup\endpgfonlayer
    \aftergroup\endgroup
  }
}

\begin{document}
	\begin{tikzpicture}
		\begin{axis}[
			height=7cm,	width=11cm,	grid=major,
    		x unit=-, y unit=-,
			xlabel=$K$,	ylabel=Normalized frequency,
			ymin=0.7,ymax=1.2,
			xmin=0, xmax=1,
			ytick distance = 0.1,
			set layers,
			%x tick label style={/pgf/number format/.cd, set thousands separator={}},
			xticklabel shift = 2 pt,
			legend pos=south west,
			%xtick =\empty
		]					
			
			\addplot +[smooth, solid, thick,color=blue,mark=none] table [x=K, y=fmin, col sep=semicolon] {ilro_locking_range.csv};
			\addplot +[smooth, solid, thick,color=blue,mark=none] table [x=K, y=fmax, col sep=semicolon] {ilro_locking_range.csv};
			\addplot +[smooth, solid, thick,color=red,mark=none] table [x=K, y=fmin2, col sep=semicolon] {ilro_locking_range.csv};
			\addplot +[smooth, solid, thick,color=red,mark=none] table [x=K, y=fmax2, col sep=semicolon] {ilro_locking_range.csv};
			\addplot +[smooth, solid, thick,color=black,mark=none] table [x=K, y=fmin3, col sep=semicolon] {ilro_locking_range.csv};
			\addplot +[smooth, solid, thick,color=black,mark=none] table [x=K, y=fmax3, col sep=semicolon] {ilro_locking_range.csv};
			\legend{$N=5$,,$N=8$,,$N=16$,};
		\end{axis}
	\end{tikzpicture}
\end{document}