\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=6cm,	width=9cm,	grid=major,
    		x unit=\SI{}{\pico\second}, y unit=\SI{}{\volt},
			xlabel=$t$,	ylabel={$V_\mathrm{SYNC}$,$V_\mathrm{O15}$},
			ymin=-1.4,ymax=1.4,
			xmin=0, xmax=200,
			ytick distance = 0.4,
			xtick distance = 25,
			set layers,
			%y tick label style={/pgf/number format/.cd, set thousands separator={}},
			xticklabel shift = 2 pt,
			legend pos=north east,
			%cycle list/Dark2,
			x tick label style={
        /pgf/number format/.cd,
            fixed,
            precision=3,
        /tikz/.cd
    }
		]	
			\addplot +[solid, smooth, thick,mark=none] table [x expr=\thisrow{ox}*1e12-498625, y expr=\thisrow{oy}, col sep=semicolon] {../cadence_data/inj_wvf.csv};
			\label{Oa};
			
			\addplot +[solid, smooth, thick,mark=none] table [x expr=\thisrow{syncx}*1e12-498625, y expr=\thisrow{syncy}, col sep=semicolon] {../cadence_data/inj_wvf.csv};
			\label{sync};
			
			
		\end{axis}
		
		\begin{axis}[
			%scale only axis,
			height=6cm,	width=9cm,
			xmin=0, xmax=200,
			ymin=-7.5,ymax=90+7.5,
			ytick distance = 15,
			axis y line*=right,
			axis x line=none,
			y unit=\SI{}{\micro\ampere},
			ylabel={$I_\mathrm{inj}$},
			%legend pos=north east
			legend style={at={(0.15,0.85)},anchor=north}
			]
			
			\addlegendimage{/pgfplots/refstyle=Oa}
			\addlegendentry{$V_\mathrm{O15}$};
			\addlegendimage{/pgfplots/refstyle=sync}
			\addlegendentry{$V_\mathrm{SYNC}$};
			\addplot +[solid, smooth, color=black, thick,mark=none] table [x expr=\thisrow{iinjx}*1e12-498625, y expr=\thisrow{iinjy}, col sep=semicolon] {../cadence_data/inj_wvf.csv};
			\addlegendentry{$I_\mathrm{inj}$};
		\end{axis}
	\end{tikzpicture}
\end{document}