I am so desperately trying to align an equation graph (which consists of a bunch of sine waves) with a ybar graphs places on its right that represents its Fourier transformation. I have used the subfloat environment in order to have two distinct figures which I could then reference and caption individually. The problem that soon arose is that I can't seem to figure out how to align these two graphs properly, and I believe that the problem comes from the fact that the ybar graph has a different structure and layout than the normal graph. I have tried hiding the tick marks of the bar graph but that didn't fix the problem. How can I solve this? Thanks in advance!
\begin{figure}[H]
\centering
\subfloat[][]{
\begin{tikzpicture}
\begin{axis}[
ymajorgrids=true,
grid style=dashed,tick pos=left,width=9cm,height=8cm]
\addplot[domain=0:1, samples=200, red, very thin]{6*sin(4*pi*deg(x))};
\addplot[domain=0:1, samples=200, cyan, very thin]{4*sin(8*pi*deg(x))};
\addplot[domain=0:1, samples=200, orange, very thin]{3*sin(12*pi*deg(x))};
\addplot[domain=0:1, samples=200, green, very thin]{2*sin(16*pi*deg(x))};
\addplot[domain=0:1,samples=200,blue, ultra thick]{6*sin(4*pi*deg(x))+4*sin(8*pi*deg(x))+3*sin(12*pi*deg(x))+2*sin(16*pi*deg(x))};
\end{axis}
\end{tikzpicture}
}
\subfloat[][]{
\begin{tikzpicture}
\begin{axis}[ybar,xmin=0,xmax=1000,tick pos=left, width=9cm,height=8cm]
\addplot
coordinates{(200,6) (400,4) (600,3) (800,2)};
\end{axis}
\end{tikzpicture}
}
\end{figure}