I have a problem with the appearance of a mutli axis plot...
Currently I have the following: 
However I do not want the arrow in the right y-axis but from the documentation I read that the * in the axis y line command should prevent this... but it doesn't. Further the upper axis, where the second x axis would appear, is now gray I however want it to be black. Hopefully someone knows the right commands to fix this.
\documentclass{standalone}
\usepackage{graphics,siunitx}
\usepackage{tikz,pgfplots}
\begin{document}
\begin{tikzpicture}
\pgfplotsset{%
compat=1.6,
width=10cm,
height=7cm,
scale only axis,
every x tick label/.append style={font=\scriptsize\color{gray!80!black}},
xmajorgrids,
xminorgrids,
every y tick label/.append style={font=\scriptsize\color{gray!80!black}},
ymajorgrids,
yminorgrids
}
\begin{axis}[%
xmin=0, xmax=40000,
xlabel={Time},
ymin=-50, ymax=50,
ylabel={Power},
axis y line*=left,
axis x line*=bottom]
\addplot [
color=red,
solid
]
coordinates{(0,0};
\label{pcharge}
\addplot [
color=green,
solid
]
coordinates{(0,0)};
\label{pbattery}
\end{axis}
\begin{axis}[%
xmin=0, xmax=40000,
ymin=0, ymax=100,
ylabel={State of charge},
axis lines=left,
axis y line*=right,
axis x line=none,
legend style={at={(1.15,1)},anchor=north west,nodes=right}]
\addplot [
color=blue,
solid
]
coordinates{(0,0)};
\addlegendentry{$SOC$};
\addlegendimage{/pgfplots/refstyle=pcharge}\addlegendentry{$P_\mathrm{charge}$};
\addlegendimage{/pgfplots/refstyle=pbattery}\addlegendentry{$P_\mathrm{battery}$};
\end{axis}
\end{tikzpicture}
\end{document}

\pgfplotsset{use layers}right after your\begin{tikzpicture}[..]statement(s) -- this improves multi-axis-plots. – Christian Feuersänger Jan 19 at 11:13