%\input{Preambulum}

\begin{figure}[ht]
\centering
\caption{The distribution of matches played in a season}
\label{Fig4}

\begin{tikzpicture}
%\selectcolormodel{gray}
\begin{axis}[width = \textwidth, 
height = 0.5\textwidth,
xlabel = Number of matches,
xlabel style = {font=\small},
ylabel = Number of teams,
ylabel style = {font=\small},
xmin = 9.05,
xmax = 20.95,
xtick distance = 2, 
ybar = 4pt,
ymin = 0,
ymajorgrids = true,
bar width = 12pt,
legend entries={$D(8+6) \qquad$,$D(4 \times 7) \qquad$,$D(4 \times 6)$},
legend style={at={(0.5,-0.2)},anchor = north,legend columns = 4,font=\small}
]
% D(8+6)
\addplot [blue, pattern color = blue, pattern = north west lines, very thick] coordinates {
(10,8)
(12,2)
(14,6)
(16,4)
(18,6)
(20,2)
};
% D(4x7)
\addplot [red, pattern color = red, pattern = grid, very thick] coordinates {
(12,4)
(14,8)
(16,12)
(18,4)
};
% D(4x6)
\addplot [ForestGreen, pattern color = ForestGreen, pattern = horizontal lines, very thick] coordinates {
(10,8)
(12,8)
(14,4)
(16,4)
};
\end{axis}
\end{tikzpicture}
\end{figure}
%\end{document}