pgfplots: problem with “non-smooth” intersection of two lines' ends

I have a problem like the one in this question, concerning a tikz drawing but for a pgfplots plot. I want to create a plot that has one region filled without opacity and a neighboring one filled with opacity. The opaque region should be coated by a solid line. I managed to get pretty much what I want with this code:

\documentclass{standalone}

\usepackage{pgfplots}
\pgfplotsset{compat=1.3}

\usepgfplotslibrary{external}
\tikzexternalize

\usepackage{filecontents}

\begin{filecontents}{total.dos}
0  0  0  0  0
1  2 -2  2 -2
2  4 -4  4 -4
3  2 -2  2 -2
4  0  0  0  0
5  1 -1  0  0
6  2 -2  0  0
7  1 -1  0  0
8  0  0  0  0
THIS WAS: TOTAL
\end{filecontents}

\begin{document}

% Set a filename for the next tikzpicture.
\tikzsetnextfilename{total_dos}

\begin{tikzpicture}
\begin{axis}[ymax=7, ymin=-7, xlabel={Energy [eV]}, ylabel={Intensity}, legend pos=north east]

\addplot [restrict x to domain=4:8, no markers, draw=red, fill=red, fill opacity=0.3] table [x=0, y expr=\thisrowno{2} - \thisrowno{4}] {\total}; \addlegendentry{$2-4$}

\addplot [restrict x to domain=4:8, no markers, draw=blue, fill=blue, fill opacity=0.3] table [x=0, y expr=\thisrowno{1} - \thisrowno{3}] {\total}; \addlegendentry{$1-3$}

\addplot [restrict x to domain=0:4, no markers, draw=blue , fill=blue] table [x=0, y=3] {\total}; \addlegendentry{$3$}

\addplot [restrict x to domain=0:4, no markers, draw=red, fill=red] table [x=0, y=4] {\total}; \addlegendentry{$4$}

\end{axis}
\end{tikzpicture}
\end{document}


This gives the following picture:

The problem is the intersections of the coating lines' ends (those that come from the draw=<color> options). They are not smooth, but look like this:

My question: How can I get these things smooth?

Side note: I know that using the option draw=none gives the behaviour I want, but then I have no line surrounding the opaque region.

-
 Would line cap=round as an option to the \addplot commands do what you want? – Jake Jan 23 '12 at 0:19 Also the triangle 90 cap arrow from arrows library can increase the blend feel. – percusse Jan 23 '12 at 0:58 @Jake: This option does improve the situation at the ends of the plot (though it's still not yet the optimum) but the intersection in the middle becomes worse than before. – Philipp Jan 23 '12 at 1:22 @percusse: I'm pretty new to tikz and couldn't get your suggestion to work. I loaded \usetikzlibrary{arrows} in the preamble and tried to use the option line cap=triangle 90 cap after addplot but that didn't work. Was this all wrong? I expect it to look similar to line cap=round. But those are just workarounds. Will it be possible to make the lines really blend like in the tikz question I linked? – Philipp Jan 23 '12 at 1:32 @Philipp: Doing this properly is really hard. Take a look at tex.stackexchange.com/questions/10980/… for some suggestions, but none of them are really the holy grail. – Jake Jan 23 '12 at 1:40