I have a MATLAB generated plot that looks as follows:

Generated with this code:
plot(fitGoodnessNRMSE,'b','LineWidth',1);
axis([1 511 0.5 1]);
ylabel('Normalized RMS error'); xlabel('q (um^-1)');
I then export it as a tikz using matlab2tikz(). And include it in my latex document:
\documentclass{standalone}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{amsmath}
\begin{document}
\input{test.tikz}
\end{document}
The latex file will not compile due to Error: Dimension too large. <recently read> \pgf@yy l.537 \end{axis}.
Inside the .tikz document is as follows:
\begin{tikzpicture}
\begin{axis}[%
width=4.52083333333333in,
height=3.565625in,
scale only axis,
xmin=1, xmax=511, xlabel={$\text{q (um}^\text{-}\text{1)}$},
ymin=0.5, ymax=1, ylabel={Normalized RMS error}]
\addplot [color=blue,solid,line width=1.0pt,forget plot]
table[row sep=crcr]{
1 -57.943745 \\
2 -14.11968 \\
3 -5.535387 \\
4 -2.4488078 \\
5 -1.0804409 \\
6 -0.30200709 \\
7 0.053585582 \\
8 0.32392563 \\
9 0.44304278 \\
.
.
511 0.90342708 \\
};
\end{axis}
\end{tikzpicture}%
Note the data hangs around 0.8 or 0.9 most of the points.
I found if I change ymin from 0.5 to 0, it compiles fine. Help as to why it does not work in its current state is greatly appreciated. I need the y axis to only display 0.5 to 1 like it does in MATLAB.
Secondly, I have been playing around with aligning plots in a table, my current attempt is shown below.
I am using largely this example: Insert image and list inside a table, but cant figure out two things:
How do I center the text under heading 'A'?
The vertical edges of the middle graph don't quite line up with the top, as shown by the red arrows in the image. Is this because the middle graph has brackets in one of the label titles that need to push it a bit to the right. How do I go about making them line up?
If possible I would like to do this by not having to alter my .tikz file once it has been created by matlab2tikz, but I understand if this is simply not possible.
Thanks