4

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.

  • 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
3

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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