Based on my origin question here: Broken bar diagram with tikz package
I am trying to color each single of a group differently. In my preamble I have defined the colors I want to use:
\definecolor{blue}{RGB}{0,150,214}
\definecolor{greenaccent}{RGB}{0,139,43}
\definecolor{purpleaccent}{RGB}{130,41,128}
\definecolor{orangeaccent}{RGB}{240,83,50}
and pgfplots
is loaded right after xcolor
.
At the moment my code looks like this:
\begin{figure}
\centering
\begin{tikzpicture}
\begin{axis}[
width=\linewidth,
ybar,
bar width=7.5pt,
ymin=0,
enlarge x limits={abs=25pt},
legend style={draw=none,at={(0.5,-0.15)},
anchor=north,legend columns=-1},
xlabel={Jahre},
ylabel={Fotos pro Tag (in Millionen)},
symbolic x coords={2008,2009,2010,2011,2012,2013,2014},
xtick=data,
]
\pgfplotsinvokeforeach{Facebook,Instagram,Snapchat,WhatsApp}{
\addplot[
draw opacity=0,
fill=blue
] table[col sep=semicolon,x=Jahr,y=#1]{./Bilder/AnzahlSocialNetwork.csv};
\addlegendentry{#1}
}
\end{axis}
\end{tikzpicture}
\caption{Anzahl der täglich hochgeladenen Fotos (in Millionen)}
\label{fig:AnzahlTäglichFotosSocialNetwork}
\end{figure}
but the fill option inside \addplot
colors everything blue (obviously). What I need is something where I can define the first y graph to be blue, the second one green, third purple, and last orange as per defined colors. In the manual it was written that one can use the bar cycle list but I could not find a option where I can use RGB values like defined here (instead of percentage of a color).