From 2e646cc2c91dcfd5a7cf5d5239e95f3c86a51e3a Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Sat, 23 Dec 2023 21:48:54 +0100 Subject: [PATCH] Fix figure scaling and axis limits --- letter.tex | 99 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 44 deletions(-) diff --git a/letter.tex b/letter.tex index 8d52ef2..3e71c60 100644 --- a/letter.tex +++ b/letter.tex @@ -52,6 +52,9 @@ % TODO \pgfplotsset{fancy marks/.style={}} +\newcommand{\figwidth}{\columnwidth} +\newcommand{\figheight}{0.75\columnwidth} + % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -343,52 +346,54 @@ explanation for this effect might be that during the decoding process convergenc on the final codeword is often not achieved, although the estimate is moving in the right general direction. This would suggest that most frame errors occur due to only a few incorrectly -decoded bits. - -\pgfplotsset{ -FERPlot/.style={ - line width=1pt, - densely dashed, - mark=triangle, - fancy marks -}, -BERPlot/.style={ - line width=1pt, - mark=*, - fancy marks, -}, -DFRPlot/.style={ - only marks, - mark=square*, - fancy marks, -}} - -\begin{figure}[h] +decoded bits.% +% +\begin{figure}[ht] \centering + \pgfplotsset{ + FERPlot/.style={ + line width=1pt, + densely dashed, + mark=triangle, + fancy marks + }, + BERPlot/.style={ + line width=1pt, + mark=*, + fancy marks, + }, + DFRPlot/.style={ + only marks, + mark=square*, + fancy marks, + }} + \begin{tikzpicture} \begin{axis}[ grid=both, xlabel={$E_\text{b} / N_0$ (dB)}, ylabel={}, ymode=log, - ymax=1.5, ymin=2e-7, - width=0.45\textwidth, - height=0.3375\textwidth, + xmin=1, xmax=8, + ymax=1, ymin=1e-6, +% ytick={1e-0, 1e-2, 1e-4, 1e-6}, + width=\figwidth, + height=\figheight, legend pos = south west, ] - \addplot+[FERPlot] + \addplot+[FERPlot, scol0] table [x=SNR, y=FER, col sep=comma, discard if not={gamma}{0.05}, discard if gt={SNR}{9}] {res/proximal_ber_fer_dfr_20433484.csv}; \addlegendentry{FER} - \addplot+[DFRPlot] + \addplot+[DFRPlot, scol2] table [x=SNR, y=DFR, col sep=comma, discard if not={gamma}{0.05}, discard if gt={SNR}{9}] {res/proximal_ber_fer_dfr_20433484.csv}; \addlegendentry{DFR} - \addplot+[BERPlot] + \addplot+[BERPlot, scol1] table [x=SNR, y=BER, col sep=comma, discard if not={gamma}{0.05}, discard if gt={SNR}{7.5}] @@ -434,8 +439,8 @@ optimization process.% xlabel={$\tilde{x}_1$}, ylabel={$\tilde{x}_2$}, y label style={at={(axis description cs:-0.06,0.5)},anchor=south}, - width=0.45\textwidth, - height=0.3375\textwidth, + width=\figwidth, + height=\figheight, grid=major, grid style={dotted}, view={0}{90}] \addplot3[point meta=\thisrow{grad_norm}, @@ -456,8 +461,8 @@ optimization process.% table[col sep=comma] {res/2d_grad_L.csv}; \end{axis} \begin{axis}[hide axis, - width=0.45\textwidth, - height=0.3375\textwidth, + width=\figwidth, + height=\figheight, xmin=10, xmax=50, ymin=0, ymax=0.4, legend style={draw=white!15!black, @@ -477,8 +482,8 @@ optimization process.% \begin{tikzpicture} \begin{axis}[xmin = -1.25, xmax=1.25, ymin = -1.25, ymax=1.25, - width=0.45\textwidth, - height=0.3375\textwidth, + width=\figwidth, + height=\figheight, xlabel={$\tilde{x}_1$}, ylabel={$\tilde{x}_2$}, y label style={at={(axis description cs:-0.06,0.5)},anchor=south}, @@ -502,8 +507,8 @@ optimization process.% table[col sep=comma] {res/2d_grad_h.csv}; \end{axis} \begin{axis}[hide axis, - width=0.45\textwidth, - height=0.3375\textwidth, + width=\figwidth, + height=\figheight, xmin=10, xmax=50, ymin=0, ymax=0.4, legend style={draw=white!15!black, @@ -531,8 +536,8 @@ Two qualities may be observed. First, the average values of the two gradients are equal, except for their sign, leading to the aforementioned oscillation. Second, the gradient of the code constraint polynomial itself starts to -oscillate after a certain number of iterations. - +oscillate after a certain number of iterations.% +% \begin{figure}[ht] \centering @@ -540,10 +545,13 @@ oscillate after a certain number of iterations. \begin{axis}[ grid=both, xlabel={Iterations}, - width=0.45\textwidth, - height=0.3375\textwidth, + width=\figwidth, + height=\figheight, xtick={0, 100, ..., 400}, xticklabels={0, 50, ..., 200}, + xmin=0, xmax=300, + ymin=-4, ymax=2, + ytick={-4,-3,...,2}, legend pos = south east, ] \addplot+ [mark=none, line width=1] @@ -596,8 +604,10 @@ the probability that a given component was decoded incorrectly.% ylabel=$P(\hat{c}_{i'} \ne c_{i'})$, xlabel=$i'$, ymode=log, - width=0.45\textwidth, - height=0.3375\textwidth, + ymin=1e-9,ymax=1e-5, + xmin=0,xmax=200, + width=\figwidth, + height=\figheight, ] \addplot+ [scol1, mark=none, line width=1] table [col sep=comma, y=p_error]{res/p_error.csv}; @@ -695,9 +705,10 @@ Again, these parameters were chosen,% grid=both, xlabel={$E_\text{b} / N_0$ (dB)}, ymode=log, - ymax=1.5, ymin=2e-7, - width=0.45\textwidth, - height=0.3375\textwidth, + xmin=1, xmax=8, + ymax=1, ymin=1e-6, + width=\figwidth, + height=\figheight, legend columns=2, legend style={draw=white!15!black, legend cell align=left,