\documentclass[border=0mm]{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{fillbetween}
\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=\SI{}{\micro\meter\squared}, y unit=\%/\upsigma,
			xlabel=Current mirror device area,	ylabel={Mismatch, rel. variation},
			ymin=2.5,ymax=12.5,
			xmin=0.064, xmax=0.576,			
			ytick distance = 2.5,
			xtick = {0.064, 0.144, 0.256, 0.4, 0.576},
			set layers,
			y tick label style={/pgf/number format/.cd, set thousands separator={}},
			xticklabel shift = 2 pt,
			legend pos=north east,
			 /pgf/number format/.cd,
            fixed,
            precision=3,
        /tikz/.cd
		]					
			
			\addplot +[solid,thick,color=blue,mark=x] table [x expr=\thisrow{area}, y expr=\thisrow{nom_mis}, col sep=semicolon] {../cadence_data/biasing_mirror.csv};
			\addlegendentry{$f_\mathrm{0}$ mismatch};
			\addplot +[solid,thick,color=red,mark=x] table [x expr=\thisrow{area}, y expr=\thisrow{nom_f0}, col sep=semicolon] {../cadence_data/biasing_mirror.csv};
			\addlegendentry{$f_\mathrm{0}$ variation};
			\addplot +[name path = min_mis,solid,thick,color=blue,mark=none, draw=none] table [x expr=\thisrow{area}, y expr=\thisrow{min_mis}, col sep=semicolon] {../cadence_data/biasing_mirror.csv};
			\addplot +[name path = max_mis,solid,thick,color=blue, mark=none, draw=none] table [x expr=\thisrow{area}, y expr=\thisrow{max_mis}, col sep=semicolon] {../cadence_data/biasing_mirror.csv};
			\addplot[blue, fill opacity = 0.15] fill between[of=min_mis and max_mis];
			\addplot +[name path = min_f0,solid,thick,color=blue,mark=none, draw=none] table [x expr=\thisrow{area}, y expr=\thisrow{min_f0}, col sep=semicolon] {../cadence_data/biasing_mirror.csv};
			\addplot +[name path = max_f0,solid,thick,color=blue, mark=none, draw=none] table [x expr=\thisrow{area}, y expr=\thisrow{max_f0}, col sep=semicolon] {../cadence_data/biasing_mirror.csv};
			\addplot[red, fill opacity = 0.25] fill between[of=min_f0 and max_f0];
			
		\end{axis}
	\end{tikzpicture}
\end{document}