\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
  }
}

\begin{document}
	\begin{tikzpicture}
		\begin{axis}[
			height=7cm,	width=11cm,	grid=major,
    		x unit=\SI{}{\mega\hertz}, y unit=\SI{}{\femto\coulomb},
			xlabel=$f_\mathrm{0}$,	ylabel=$Q_\mathrm{inj}$,
			ymin=0,ymax=6,
			xmin=580, xmax=660,
			ytick distance = 1,
			xtick ={580,590,600,610,625,640,650,660},
			set layers,
			%y tick label style={/pgf/number format/.cd, set thousands separator={}},
			xticklabel shift = 2 pt,
			legend style={at={(0.5,0.9)},anchor=north}
			%cycle list/Dark2
		]					
			
			%\addplot +[solid, thick,mark=none] table [x expr=\thisrow{x1}*1e-6, y expr=\thisrow{y1}*1e15, col sep=semicolon] {../cadence_data/qinj_r1.csv};
			%\addlegendentry{$\mathrm{R}_\mathrm{inj}=\SI{1}{\ohm}$};
			\addplot +[solid, thick,mark=none] table [x expr=\thisrow{x1k}*1e-6, y expr=\thisrow{y1k}*1e15, col sep=semicolon] {../cadence_data/qinj_r1k.csv};
			\addlegendentry{$\mathrm{R}_\mathrm{inj}=\SI{1}{\kilo\ohm}$};
			\addplot +[solid, color=red,thick,mark=none] table [x expr=\thisrow{x10k}*1e-6, y expr=\thisrow{y10k}*1e15, col sep=semicolon] {../cadence_data/qinj_r10k.csv};
			\addlegendentry{$\mathrm{R}_\mathrm{inj}=\SI{10}{\kilo\ohm}$};
			\addplot +[solid, color=black,thick,mark=none] table [x expr=\thisrow{x100k}*1e-6, y expr=\thisrow{y100k}*1e15, col sep=semicolon] {../cadence_data/qinj_r100k.csv};
			\addlegendentry{$\mathrm{R}_\mathrm{inj}=\SI{100}{\kilo\ohm}$};
			
			
		\end{axis}
	\end{tikzpicture}
\end{document}