2

Is there a possibility to color bars of one plot in different colors?

\begin{tikzpicture}
\begin{axis}[
  xbar, xmin=0,
  width=12cm, height=3.5cm, enlarge y limits=0.5,
  xlabel={\#participants},
  symbolic y coords={no,yes},
  ytick=data,
  nodes near coords, nodes near coords align={horizontal},
]
  \addplot coordinates {(3,no) (7,yes)};
\end{axis}
\end{tikzpicture}

Bar chart example

I want to color these bars e.g. in red and blue.

Ludovic C.
  • 8,888
fyaa
  • 213
  • Hi fyaa, welcome to the site! I think the question I linked to above should answer your question. If it doesn't, please edit your question and add some more detail (i.e. why the other answer doesn't solve your problem) – Jake Sep 26 '13 at 15:22

0 Answers0