I want to create a bell curve with some explanatory text around it. However I am unable to add linebreaks to the notes, and also failed to get the two texts about life expectancy in latex. My own code so far is below as well.
Thanks!
EDIT: The problems with the linebreaks are solved! However, I still dont understand how to get the arrows below the graph with Increasing/Decreasing life expectancy below them
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\pgfmathdeclarefunction{gauss}{2}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
}
\begin{tikzpicture}
\begin{axis}[
no markers, domain=0:10, samples=1000,
%axis lines*=left,
axis y line=none,
axis x line*=bottom,
%xlabel=$x$, ylabel=$y$,
every axis y label/.style={at=(current axis.above origin),anchor=south},
every axis x label/.style={at=(current axis.right of origin),anchor=west},
height=6.25cm, width=15cm,
xtick=\empty, ytick=\empty,
enlargelimits=false, clip=false, axis on top,
grid = none
]
\addplot [fill=cyan!20, draw=none, domain=6:7] {gauss(5,1.1)} \closedcycle;
% \addplot [very thick,cyan!50!black] {gauss(4,1)};
\addplot [very thick,cyan!50!black] {gauss(5,1.1)};
\draw [yshift=-0.6cm, latex-latex](axis cs:4,0) -- node [fill=white] {Value of liabilities} (axis cs:6,0);
\draw[cyan!35] (axis cs:5,0) -- (axis cs:5,0.4);
\node[coordinate,pin=45:{Attachment point}]
at (axis cs:6,0.2399) {};
\node[coordinate,pin=45:{Detachment point}]
at (axis cs:7,0.06945) {};
\node[coordinate,pin=180:{Expected value \\ of liabilities}]
at (axis cs:5,0.39) {};
\end{axis}
\end{tikzpicture}
\end{document}


