# pgfplot: Labels on two sides of an axis

I am attempting to visualize responses of a questionnaire study in which respondents have answered a group of semantic differentials. As such I want to label both ends of each response category, which mean labelling both the left and right hand side of the y-axis. What I currently have is this:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz,pgfplots}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
legend cell align=left,
legend style={at={(0.5,1.1)},anchor=north},
legend style={draw=none},
legend columns=-1,
%enlarge x limits=0.,
xbar,
bar width=6pt,
%x coord trafo/.code={\pgfmathparse{-x}},
xmin=0,
xmax=7,
ytick={1,2,3,4,5,6,7},
font=\footnotesize,
%xticklabels={1,2,3,4,5,6,7},
yticklabels={%
Incompetent,
Ignorant,
Unpredictable,
Irresponsible,
Unintelligent,
Compliant,
Foolish
}
]

draw=black,fill=black]
table{
x   y   label
2   1   1
3   2   1
2   3   1
5   4   1
5   5   1
4   6   1
7   7   1
};

draw=gray,fill=gray]
table{
x   y   label
1   1   1
5   2   1
1   3   1
2   4   1
3   5   1
1   6   1
2   7   1
};

\legend{C1, C2}
\end{axis}
\end{tikzpicture}

\end{document}

Which produces this:

How do I add labels to the right hand side of the graph? (if it at all is possible)

• Have you had a look in the manual? Chapter 4.9.11 Two Ordinates (y-axis) or Multiple Axes sounds promising. You basically draw two axes systems on top of each other. – Dr. Manuel Kuehner May 19 '18 at 11:53

Straight from the manual.

% Preamble: \pgfplotsset{width=7cm,compat=1.16}
\begin{tikzpicture}
% let both axes use the same layers
\pgfplotsset{set layers}
\begin{axis}[
scale only axis,
xmin=-5,xmax=5,
axis y line*=left, % the ’*’ avoids arrow heads
xlabel=$x$,
ylabel=First ordinate,
]
\end{axis}
\begin{axis}[
scale only axis,
xmin=-5,xmax=5,
axis y line*=right,
axis x line=none,
ylabel=Second ordinate,
]