Code: Select all
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{figure}[!htb]
\centering
\begin{tikzpicture}[scale=1],
\begin{axis}[
height=8cm,
width=14cm,
xmin=0,
xmax=4.5,
ymax=45,
ymin=20,
ylabel={Elastic Modulus E (Gpa)},
axis x line*=bottom,
axis y line*=left,
xticklabels={1,2,3,4},xtick={1,...,4},
x tick label style={anchor=east}
]
\addplot+[black,only marks][error bars/.cd,y dir=both, y explicit] coordinates {
(4,32.32) +- (0,7.52)
(3,32.73) +- (0.0,8.0)
(2,33.24) +- (0,8.38)
(1,35) +- (0,7.5)
};
\node at (axis cs:4,32.32) [pin={120:(32.32,7.52)},inner sep=0pt] {};
\node at (axis cs:3,32.73) [pin={130:(32.73,8.0)},inner sep=0pt] {};
\node at (axis cs:2,33.24) [pin={130:(33.24,8.38)},inner sep=0pt] {};
\node at (axis cs:1,35) [pin={130:(35,7.5)},inner sep=0pt] {};
\addplot[color=black] coordinates {(1,35) (2,33.24) (3,32.73) (4,32.32)};
\end{axis}
\end{tikzpicture}%
\caption{Plot showing update for elastic modulus after each data step with trust factor}
\label{fig:bayesianupdatingstepsincludingt}
\end{figure}
\end{document}