# PgfPlot with Y-axis only on the right hand side

I'm trying to draw graph similar to the one below with the Y-axis only on the RHS.

The following MWE produces something close the desired result:

\documentclass{standalone}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}[scale=0.75]
\begin{axis}[ylabel=Y-Axis, xlabel=X-Axis
, xmin=2, xmax=10, ymin=0, ymax=12, clip=false, axis y line*=right]
\foreach \blah in {0.9,0.5,0.2,0.1,0.05,0.02,0.01,0.005}{
\addplot[mark=none, domain=2:10, thick] {-ln(\blah/x^2)/ln(x)} node [pos=0,left] {$c_2=$}; %Varying c_2 values
}
\end{axis}
\end{tikzpicture}

\end{document}


as this image shows:

The y-axis label has not moved to the right and the box line on the left has disappeared entirely.

Any thoughts on how to make things right and get a y-axis on the right-hand side and a box line on the left-hand side?

Thanks!

-

Replace axis y line*=right with ylabel near ticks, yticklabel pos=right (Thanks Jake):

## Code:

\documentclass{standalone}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}[scale=0.75]
\begin{axis}[
ylabel=Y-Axis, xlabel=X-Axis,
xmin=2, xmax=10, ymin=0, ymax=12, clip=false,
%axis y line*=right% replaced this option with:
ylabel near ticks, yticklabel pos=right
]
\foreach \blah in {0.9,0.5,0.2,0.1,0.05,0.02,0.01,0.005}{
\addplot[mark=none, domain=2:10, thick] {-ln(\blah/x^2)/ln(x)} node [pos=0,left] {$c_2=$}; %Varying c_2 values
}
\end{axis}
\end{tikzpicture}

\end{document}

-
Thanks, Peter. Do you know how I can get a solid line on the left-hand side of the box? – Richard Jul 18 '12 at 21:44
Perfect @Jake, thanks. Feel free to edit Peter's answer or write one up of your own. – Richard Jul 18 '12 at 21:47