Using pgfplots I have a region enclosed within three lines and the axes. I used the intersections library as indicated by this solution. The problem is that the intersections do not all seem to be correct. Since I am intersecting just lines with lines, there should be one intersection per pair of lines. Below is an MWE that produces the figure shown. I want the blue region to be the darkest red region that can be seen just peeping out from behind.
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis lines=left,
every axis x label/.style={at={(ticklabel* cs:1.05)}, anchor=west,},
every axis y label/.style={at={(ticklabel* cs:1.05)}, anchor=west,},
enlargelimits={value=0.2,upper},
scaled ticks=false,
minor x tick num=1,
domain=0:8,
]
\addplot[name path global=line1, black, fill=red, fill opacity=0.2]
{6}node[black,opacity=1,above]{line1}\closedcycle;
\draw[name path global=line2] ({axis cs:4,0}|-{rel axis cs:0,0}) -- ({axis cs:4,0}|-{rel axis cs:0,1})node[pos=0.8,black,opacity=1,right]{line2};
\addplot[fill=red, fill opacity=0.2,domain=0:4] {12}\closedcycle;
\addplot[name path global=line3, black, fill=red, fill opacity=0.2]
{(18-3*x)/2}node[sloped,pos=0.63,opacity=1,above]{line3}\closedcycle;
\fill[name intersections={of=line1 and line2,by=point12},
name intersections={of=line1 and line3,by=point13},
name intersections={of=line2 and line3,by=point23},
][fill=blue](0,0)--(0,6)--(point13)node{13}--(point23)node{23}--(4,0)--(0,0);
\end{axis}
\end{tikzpicture}%
\end{document}


\closedcyclepart, if you remove both of those the problem is solved but the fill goes away. Let me work a bit to fix it... – darthbith Feb 02 '15 at 15:58\closedcycleis obviously part of the path, hence "lines" have more than one intersection point! – Geoff Feb 02 '15 at 16:11