[Tex/LaTex] Show tick labels on both edges in groupplot

groupplotslabelspgfplots

I would like to put quite many small plots in a groupplot environment and provide ticklabels on all adges of the groupplot (no labels at individual plots).
In the following example, I've set the labels to bottom and left. I could set them to top and right, too, but I am looking for an option called "both" or the like and could not find it. How can I print the labels on all four edges?

\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\begin{document}

\begin{tikzpicture}
    \begin{groupplot}[group style={group size=2 by 2,
        horizontal sep=7pt,vertical sep=7pt,
        xticklabels at=edge bottom,
        yticklabels at=edge left},
    axis on top,
    enlargelimits=false,
    xmin=-26,xmax=26,ymin=-2,ymax=2,
    height=5cm,width=.4\textwidth]
    \nextgroupplot[]
    \addplot {sin(x)};
    \nextgroupplot[]
    \addplot {sin(x)};
    \nextgroupplot[]
    \addplot {sin(x)};
    \nextgroupplot[]
    \addplot {sin(x)};
    \end{groupplot}
\end{tikzpicture}

\end{document}

output

Best Answer

A bit more tedious, but you can set the ticklabel pos for each axis:

\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\begin{document}

\begin{tikzpicture}
    \begin{groupplot}[group style={group size=2 by 2,
        horizontal sep=7pt,vertical sep=7pt},
    axis on top,
    enlargelimits=false,
    xmin=-26,xmax=26,ymin=-2,ymax=2,
    height=5cm,width=.4\textwidth]
    \nextgroupplot[xticklabel pos=right]
    \addplot {sin(x)};
    \nextgroupplot[xticklabel pos=right,yticklabel pos=right]
    \addplot {sin(x)};
    \nextgroupplot[]
    \addplot {sin(x)};
    \nextgroupplot[yticklabel pos=right]
    \addplot {sin(x)};
    \end{groupplot}
\end{tikzpicture}

\end{document}

enter image description here

Related Question