Wie färbe ich am besten ein Pyramidendiagramm?
Pyramidendiagramm:
Pyramidendiagramm (Beispiel):
![alt text][1]
Könnte man automatisch Farben zuordnen? Bzw. wahlweise manuell?
So geht es schonmal nicht:
![alt text][2]
    \documentclass[border=10pt, varwidth, tikz]{standalone}
    
    \usepackage{calc}
    \usepackage{ifthen}
    \usepackage{tikz}
    	\usetikzlibrary{intersections}
    \begin{document}
    
    
    
    \begin{tikzpicture}
    \pgfmathsetmacro{\grundseite}{6.3}  %Grundseite
    \pgfmathsetmacro{\hoehe}{7} %Höhe
    
    \coordinate (A) at (-0.5*\grundseite,0);
    \coordinate (B) at (0.5*\grundseite,0);
    \coordinate (C) at (0,\hoehe);
    % Dreieck
    \draw[name path=AC] (A) -- (C);
    \draw[name path=BC] (B) -- (C);
    \draw[name path=AB] (A) -- (B);
    
    % Werte
    \foreach \y/\TEXT/\Farbe in {% ================
    0/G/brown,
    1.25/F/red,%,
    2/E/orange%,
    %3/D,
    %4/C,5/B,
    %6/Rest
    }% ================
    {
    \path[name path=horiz] (A|-0,\y) -- (B|-0,\y);
    \draw[name intersections={of=AC and horiz,by=P},
    name intersections={of=BC and horiz,by=Q}] (P) -- (Q)
    node[midway,above] {\TEXT};
    \fill[color=\Farbe] (A) -- (P)  -- (Q) -- (B); 
    }
    \end{tikzpicture}
    
    \end{document}
  [1]: http://texwelt.de/wissen/upfiles/55555555_70.png
  [2]: http://texwelt.de/wissen/upfiles/9999999999999999_5.jpg