I have the following result:
but I need this result:
The code I used is the following.
\begin{figure}[H]
\centering
\begin{tabularx}{12cm}{c}
\begin{tikzpicture}
\begin{axis}[
ybar,ymin=0,
width=12cm, height=8cm,
bar width=15pt,
x tick label style={
rotate=-90},
major x tick style = transparent,
ymajorgrids = true,
xtick = data,
scaled y ticks = false,
symbolic x coords={4-Pa-Pr, 5-Pa-Pr, 6-Pa-Pr, 6-C-Pr, 6-M-Pr, 6-W-Pr, 7-Pa-Pr, 4-Pa-S, 5-Pa-S, 6-Pa-S, 6-C-S, 6-M-S, 6-W-S, 7-Pa-S},
ymajorgrids]
\addplot[fill=red!50] table[x=Sample,y=BD] {BulkDensity.dat};
\end{axis}
\end{tikzpicture}
\end{tabularx}
\caption{Bulk Density (g/cm\ap{3})}
\label{fig:BD}
\end{figure}


skip first n(see section "4.3.2 Reading Coordinates From Tables" of pgfplots manual) to plot the last part of the histogram in red. – LucaD Oct 12 '15 at 15:30tabularxin your example? – LucaD Oct 12 '15 at 15:32BulkDensity.dat? – cmhughes Oct 12 '15 at 17:50