% vim: set ts=2 sw=2 noet:

\newcommand{\makeplot}[6]{%
	\hfill
	\begin{tikzpicture}
		\begin{axis}[
				width  = {\linewidth / 3.5},
				height = {\linewidth / 3.5},
				grid = major,
				xmin = {-#4}, xmax = {#4},
				ymin = {-#4}, ymax = {#4},
				#5
			]

			\addplot[only marks, #6] table[x index = #2, y index = #3] {#1};
		\end{axis}
	\end{tikzpicture}
	\hfill
}

\noindent
\makeplot{figures/data/qpsk_sim_static_firblock_nlos_halfsymb.dat}{0}{1}{4}{
	ylabel = {Channel with ISI},
	yticklabel style = {
		text width = 2.25em,
		align = right,
	},
	title = {1 Tap NLOS},
}{magenta!80!blue}
\makeplot{figures/data/qpsk_sim_static_firblock_los_halfsymb.dat}{0}{1}{4}{
	title = {1 Tap LOS},
}{magenta!80!blue}
\makeplot{figures/data/qpsk_sim_static_firblock_los_vec.dat}{0}{1}{4}{
	title = {4 Taps LOS},
}{magenta!80!blue}
\newline

\noindent
\makeplot{figures/data/qpsk_sim_static_firblock_nlos_halfsymb.dat}{2}{3}{4}{%
	ylabel = {Synchronized},
	yticklabel style = {
		text width = 2.25em,
		align = right,
	},
}{magenta!60!blue}
\makeplot{figures/data/qpsk_sim_static_firblock_los_halfsymb.dat}{2}{3}{4}{}{magenta!60!blue}
\makeplot{figures/data/qpsk_sim_static_firblock_los_vec.dat}{2}{3}{4}{}{magenta!60!blue}
\newline

\noindent
\makeplot{figures/data/qpsk_sim_static_firblock_nlos_halfsymb.dat}{4}{5}{1}{%
	ylabel = {Equalized},
	yticklabel style = {
		text width = 2.25em,
		align = right,
	},
}{magenta!40!blue}
\makeplot{figures/data/qpsk_sim_static_firblock_los_halfsymb.dat}{4}{5}{1}{}{magenta!40!blue}
\makeplot{figures/data/qpsk_sim_static_firblock_los_vec.dat}{4}{5}{1}{}{magenta!40!blue}
\newline

\noindent
\makeplot{figures/data/qpsk_sim_static_firblock_nlos_halfsymb.dat}{6}{7}{1}{%
	ylabel = {Locked},
	yticklabel style = {
		text width = 2.25em,
		align = right,
	},
}{magenta!20!blue}
\makeplot{figures/data/qpsk_sim_static_firblock_los_halfsymb.dat}{6}{7}{1}{}{magenta!20!blue}
\makeplot{figures/data/qpsk_sim_static_firblock_los_vec.dat}{6}{7}{1}{}{magenta!20!blue}
\newline

