Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I created a plot with pgfplots using this snippet of code:

\begin{figure}[htp]
\centering
    \begin{tikzpicture}
        \begin{semilogxaxis}[ybar stacked,ymajorgrids=true]
            \addplot [red]
                table [x=nodes,y=1]
                {./MATLAB/grafici/energia/broadcast_scenario/energy_broadcast_varpktslossprobability_100nodes.txt};
        \end{semilogxaxis}
    \end{tikzpicture}
\end{figure}

I got as result the correct plot, but the bars aren't fully colored. Only the borders of this bar are colored of red, instead I would like them fully colored also internally.

share|improve this question
    
Ok problem solved...It exists the command fill –  Mazzy Dec 23 '12 at 18:57
3  
It would be great if you could post an answer to your question and self-accept it –  Jake Dec 23 '12 at 18:59
add comment

1 Answer

up vote 3 down vote accepted

To fill a stacked bar it needs to add the command fill to \addplot and eventually draw to color the outside borders

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.