\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}
\usepgfplotslibrary{colorbrewer}
% \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
  }
}

\sisetup{per-mode=symbol}

\begin{document}
	\begin{tikzpicture}
		\begin{loglogaxis}[
			height=7cm,	width=11cm,	grid=both,
    		x unit=\SI{}{\hertz}, y unit=\SI{}{\ampere\per\volt},
			xlabel=$f$,	ylabel=$g_\mathrm{m}$ ($V_\mathrm{DD}$ to $I_\mathrm{out}$),
			ymin=1e-7,ymax=1e-4,
			xmin=1e4, xmax=1e9,
			%ytick = {580, 590, 600, 610, 625, 640, 650, 660, 670},
			%xtick distance = 25,
			set layers,
			%y tick label style={/pgf/number format/.cd, set thousands separator={}},
			xticklabel shift = 2 pt,
			legend style={at={(0.03,0.5)},anchor=west}
			%cycle list/Dark2
		]	
			\addplot +[solid,color=red, thick,mark=none] table [x expr=\thisrow{freq}, y expr=\thisrow{mag}, col sep=semicolon] {../cadence_data/psrr_transconductance.csv};
			
			
			
		\end{loglogaxis}
	\end{tikzpicture}
\end{document}