Graphics, Figures & TablesNormal Distribution on Error Bars

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mayankmi
Posts: 45
Joined: Sat Apr 20, 2013 7:52 pm

Normal Distribution on Error Bars

Post by mayankmi »

This is a bit tough. I tried to draw normal distribution on every error bar. Since in this case the normal distribution has to be inverted. For example 1st normal distribution will be having mean 35 and standard deviation of 7.5. I tried to search so many things but every time they draw y as function of x. I am trying this for two days but could not find it.

Code: Select all

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

mayankmi
Posts: 45
Joined: Sat Apr 20, 2013 7:52 pm

Normal Distribution on Error Bars

Post by mayankmi »

I had used this, but it is a super long code and it also compiles very slowly. :cry:

Code: Select all

Code, edit and compile here:
\documentclass{article}
\usepackage{pgfplots,pgfplotstable}
\usepackage{filecontents}
\begin{filecontents}{dataA.txt}
1.00226226913365
1.00312239104362
1.00398127101215
1.00483763991946
1.00569020162844
1.00653763603497
1.00737860228023
1.00821174211507
1.00903568340546
1.00984904376729
1.01065043431763
1.01143846352885
1.01221174117105
1.01296888232776
1.01370851146886
1.01442926656443
1.01512980322243
1.01580879883290
1.01646495670100
1.01709701015087
1.01770372658228
1.01828391146207
1.01883641223215
1.01936012211647
1.01985398380919
1.02031699302696
1.02074820190871
1.02114672224672
1.02151172853358
1.02184246081058
1.02213822730355
1.02239840683350
1.02262245099031
1.02280988605871
1.02296031468724
1.02307341729179
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Post Reply