for example 7.5 should come for 1st one...etc etc
Also the color of error bars needs to be changed to black.
Code: Select all
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{figure}[htbp]
\centering
\begin{tikzpicture}[scale=1],
\centering
\begin{axis}[
height=8cm,
width=14cm,
ymax=45,
ymin=20,
xmin=0.5,
xmax=4.5,
ylabel=Elastic Modulus E (Gpa),
axis y line*=left,
axis x line*=bottom,
xticklabels={Normal Prior-Literature,Normal Posterior-1st update,Normal Posterior-2nd update,Normal Posterior-Final},xtick={1,...,4},
x tick label style={rotate=90,anchor=east}]
\addplot+[only marks][error bars/.cd,y dir=both, y explicit]
coordinates {
(4,32.26) +- (0,4.8)
(3,32.7) +- (0.0,5.89)
(2,33.21) +- (0,7.25)
(1,35) +- (0,7.5)
};
\addplot[color=black] coordinates {(1,35) (2,33.21) (3,32.7) (4,32.26)};
\end{axis}
\end{tikzpicture}%
\caption{Plot showing update after each data step}
\label{fig:bayesianupdatingstepswithoutt}
\end{figure}
\end{document}