I was following the explained in Two x-axis, one below the other, in a pgfplots groupplots, but I am unable to make the same thing when the plot has two columns.
I need to match the 0 Hz tick in the upper x-axis with the 0 rad/s tick in the lower x-axis, and the same with the 1 Hz tick in the upper x-axis and the 2*pi rad/s tick in the lower x-axis.
My code follows below. I left just two points in each plot. They will seem empty.
Any suggestion?
\documentclass{standalone}
\usepackage{filecontents}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots,units}
\pgfplotsset{compat=1.14}
\begin{filecontents*}{ArbitraryPhaseUncontrolledMag_s21_prototype.csv}
freq,s21_dB
0.01,-0.11462467235855
1,-64.67870768049613
\end{filecontents*}
\begin{filecontents*}{ArbitraryPhaseUncontrolledMag_s11_prototype.csv}
freq,s11_dB
0.01,-15.84224832175662
1,-1.478814217873018e-06
\end{filecontents*}
\begin{filecontents*}{ArbitraryPhaseUncontrolledMag_gd_prototype.csv}
freq,group_delay
0.01495,2.587062551091017
1,0.05680967942229484
\end{filecontents*}
\begin{document}
\begin{tikzpicture}
\begin{groupplot}[
group style={
group size=2 by 2,
horizontal sep=2cm,
vertical sep=0.7cm,
xlabels at=edge bottom,
ylabels at=edge left,
},
% scale only axis,
% scaled x ticks=false,
% change x base,
% x unit=Hz,
% xlabel={Frequency},
grid=major,
]
\nextgroupplot[
ylabel=$ S_{21} $,
x unit=Hz,
xlabel={Frequency},
]
\addplot[blue] table[x=freq,y=s21_dB,col sep=comma] {ArbitraryPhaseUncontrolledMag_s21_prototype.csv};
\addplot[red] table[x=freq,y=s11_dB,col sep=comma] {ArbitraryPhaseUncontrolledMag_s11_prototype.csv};
\nextgroupplot[
ylabel=$ \tau_{g} $,
x unit=Hz,
xlabel={Frequency},
]
\addplot[blue] table[x=freq,y=group_delay,col sep=comma] {ArbitraryPhaseUncontrolledMag_gd_prototype.csv};
\nextgroupplot[
axis y line=none,
axis x line*=bottom,
grid=none,
xlabel=Frequency,
x unit=rad/s,
xmin=0,
xmax=2*pi,
xtick={0,0.2*2*pi,0.4*2*pi,0.6*2*pi,0.8*2*pi,2*pi},
height=2.3cm
]
\nextgroupplot[
axis y line=none,
axis x line*=bottom,
grid=none,
xlabel=Frequency,
x unit=rad/s,
xmin=0,
xmax=2*pi,
xtick={0,0.2*2*pi,0.4*2*pi,0.6*2*pi,0.8*2*pi,2*pi},
height=2.3cm
]
\end{groupplot}
\end{tikzpicture}
\end{document}


xtick={0,0.2*2*pi,0.4*2*pi,0.6*2*pi,0.8*2*pi,2*pi},byxtick={0,1.256637,2.513274,3.769911,5.026548,6.2831853}, xticklabels={0,$\frac{2\pi}{5}$,$\frac{4\pi}{5}$,$\frac{6\pi}{5}$,$\frac{8\pi}{5}$,$2\pi$}, ymin=0, ymax=0,– Joao Alberto Mar 28 '18 at 13:32