I'd like to have a barplot with bars side-by-side and with alternating colors. It should look like the ouput of the code below, just with alternating bar colors. (Got the idea from here)
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\begin{document}
\begin{tikzpicture}
\begin{axis}[ybar interval, xmin=0, xmax=0.3,]
\addplot+[bar shift=0pt] coordinates
{(0,2) (0.1,1) (0.2,0.5) (0.3,0.7)};
\end{axis}
\end{tikzpicture}
\end{document}
In the manual I only see options for plots that are added as separate plots, but I don't know how to align them properly. And my search only finds solutions with separated bars that can have different colors. How can I accomplish the task to have bars with different colors besides each other in pdflatex?