Fix figure scaling and axis limits

This commit is contained in:
Andreas Tsouchlos 2023-12-23 21:48:54 +01:00
parent 5e735df104
commit 2e646cc2c9

View File

@ -52,6 +52,9 @@
% TODO % TODO
\pgfplotsset{fancy marks/.style={}} \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 on the final codeword is often not achieved, although the estimate is moving in
the right general direction. the right general direction.
This would suggest that most frame errors occur due to only a few incorrectly This would suggest that most frame errors occur due to only a few incorrectly
decoded bits. decoded bits.%
%
\begin{figure}[ht]
\centering
\pgfplotsset{ \pgfplotsset{
FERPlot/.style={ FERPlot/.style={
line width=1pt, line width=1pt,
densely dashed, densely dashed,
mark=triangle, mark=triangle,
fancy marks fancy marks
}, },
BERPlot/.style={ BERPlot/.style={
line width=1pt, line width=1pt,
mark=*, mark=*,
fancy marks, fancy marks,
}, },
DFRPlot/.style={ DFRPlot/.style={
only marks, only marks,
mark=square*, mark=square*,
fancy marks, fancy marks,
}} }}
\begin{figure}[h]
\centering
\begin{tikzpicture} \begin{tikzpicture}
\begin{axis}[ \begin{axis}[
grid=both, grid=both,
xlabel={$E_\text{b} / N_0$ (dB)}, ylabel={}, xlabel={$E_\text{b} / N_0$ (dB)}, ylabel={},
ymode=log, ymode=log,
ymax=1.5, ymin=2e-7, xmin=1, xmax=8,
width=0.45\textwidth, ymax=1, ymin=1e-6,
height=0.3375\textwidth, % ytick={1e-0, 1e-2, 1e-4, 1e-6},
width=\figwidth,
height=\figheight,
legend pos = south west, legend pos = south west,
] ]
\addplot+[FERPlot] \addplot+[FERPlot, scol0]
table [x=SNR, y=FER, col sep=comma, table [x=SNR, y=FER, col sep=comma,
discard if not={gamma}{0.05}, discard if not={gamma}{0.05},
discard if gt={SNR}{9}] discard if gt={SNR}{9}]
{res/proximal_ber_fer_dfr_20433484.csv}; {res/proximal_ber_fer_dfr_20433484.csv};
\addlegendentry{FER} \addlegendentry{FER}
\addplot+[DFRPlot] \addplot+[DFRPlot, scol2]
table [x=SNR, y=DFR, col sep=comma, table [x=SNR, y=DFR, col sep=comma,
discard if not={gamma}{0.05}, discard if not={gamma}{0.05},
discard if gt={SNR}{9}] discard if gt={SNR}{9}]
{res/proximal_ber_fer_dfr_20433484.csv}; {res/proximal_ber_fer_dfr_20433484.csv};
\addlegendentry{DFR} \addlegendentry{DFR}
\addplot+[BERPlot] \addplot+[BERPlot, scol1]
table [x=SNR, y=BER, col sep=comma, table [x=SNR, y=BER, col sep=comma,
discard if not={gamma}{0.05}, discard if not={gamma}{0.05},
discard if gt={SNR}{7.5}] discard if gt={SNR}{7.5}]
@ -434,8 +439,8 @@ optimization process.%
xlabel={$\tilde{x}_1$}, xlabel={$\tilde{x}_1$},
ylabel={$\tilde{x}_2$}, ylabel={$\tilde{x}_2$},
y label style={at={(axis description cs:-0.06,0.5)},anchor=south}, y label style={at={(axis description cs:-0.06,0.5)},anchor=south},
width=0.45\textwidth, width=\figwidth,
height=0.3375\textwidth, height=\figheight,
grid=major, grid style={dotted}, grid=major, grid style={dotted},
view={0}{90}] view={0}{90}]
\addplot3[point meta=\thisrow{grad_norm}, \addplot3[point meta=\thisrow{grad_norm},
@ -456,8 +461,8 @@ optimization process.%
table[col sep=comma] {res/2d_grad_L.csv}; table[col sep=comma] {res/2d_grad_L.csv};
\end{axis} \end{axis}
\begin{axis}[hide axis, \begin{axis}[hide axis,
width=0.45\textwidth, width=\figwidth,
height=0.3375\textwidth, height=\figheight,
xmin=10, xmax=50, xmin=10, xmax=50,
ymin=0, ymax=0.4, ymin=0, ymax=0.4,
legend style={draw=white!15!black, legend style={draw=white!15!black,
@ -477,8 +482,8 @@ optimization process.%
\begin{tikzpicture} \begin{tikzpicture}
\begin{axis}[xmin = -1.25, xmax=1.25, \begin{axis}[xmin = -1.25, xmax=1.25,
ymin = -1.25, ymax=1.25, ymin = -1.25, ymax=1.25,
width=0.45\textwidth, width=\figwidth,
height=0.3375\textwidth, height=\figheight,
xlabel={$\tilde{x}_1$}, xlabel={$\tilde{x}_1$},
ylabel={$\tilde{x}_2$}, ylabel={$\tilde{x}_2$},
y label style={at={(axis description cs:-0.06,0.5)},anchor=south}, 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}; table[col sep=comma] {res/2d_grad_h.csv};
\end{axis} \end{axis}
\begin{axis}[hide axis, \begin{axis}[hide axis,
width=0.45\textwidth, width=\figwidth,
height=0.3375\textwidth, height=\figheight,
xmin=10, xmax=50, xmin=10, xmax=50,
ymin=0, ymax=0.4, ymin=0, ymax=0.4,
legend style={draw=white!15!black, 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, First, the average values of the two gradients are equal, except for their sign,
leading to the aforementioned oscillation. leading to the aforementioned oscillation.
Second, the gradient of the code constraint polynomial itself starts to 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] \begin{figure}[ht]
\centering \centering
@ -540,10 +545,13 @@ oscillate after a certain number of iterations.
\begin{axis}[ \begin{axis}[
grid=both, grid=both,
xlabel={Iterations}, xlabel={Iterations},
width=0.45\textwidth, width=\figwidth,
height=0.3375\textwidth, height=\figheight,
xtick={0, 100, ..., 400}, xtick={0, 100, ..., 400},
xticklabels={0, 50, ..., 200}, xticklabels={0, 50, ..., 200},
xmin=0, xmax=300,
ymin=-4, ymax=2,
ytick={-4,-3,...,2},
legend pos = south east, legend pos = south east,
] ]
\addplot+ [mark=none, line width=1] \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'})$, ylabel=$P(\hat{c}_{i'} \ne c_{i'})$,
xlabel=$i'$, xlabel=$i'$,
ymode=log, ymode=log,
width=0.45\textwidth, ymin=1e-9,ymax=1e-5,
height=0.3375\textwidth, xmin=0,xmax=200,
width=\figwidth,
height=\figheight,
] ]
\addplot+ [scol1, mark=none, line width=1] \addplot+ [scol1, mark=none, line width=1]
table [col sep=comma, y=p_error]{res/p_error.csv}; table [col sep=comma, y=p_error]{res/p_error.csv};
@ -695,9 +705,10 @@ Again, these parameters were chosen,%
grid=both, grid=both,
xlabel={$E_\text{b} / N_0$ (dB)}, xlabel={$E_\text{b} / N_0$ (dB)},
ymode=log, ymode=log,
ymax=1.5, ymin=2e-7, xmin=1, xmax=8,
width=0.45\textwidth, ymax=1, ymin=1e-6,
height=0.3375\textwidth, width=\figwidth,
height=\figheight,
legend columns=2, legend columns=2,
legend style={draw=white!15!black, legend style={draw=white!15!black,
legend cell align=left, legend cell align=left,