- #1

- 3,264

- 4

ok I was able to get the graph of P(z>1.28)

\begin{tikzpicture}

%preamble \usepackage{pgfplots}

\newcommand\gauss[2]{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))} % Gauss function, parameters mu and sigma

\begin{axis}[every axis plot post/.append style={

mark=none,samples=50,smooth}, % All plots: 50 samples, smooth, no marks

axis x line*=bottom, % no box around the plot, only x axis

axis y line=none, % the * suppresses the arrow tips

enlargelimits=upper, % extend the axes a bit to the right and top

domain=-4:4] % Default for all plots: from -4:4

%\node [below] at (1.28,0) {$a$};%

\addplot [fill=cyan!30, draw=none, domain=1.28:4] {\gauss{0}{1}} \closedcycle;

\addplot {\gauss{0}{1}};

\end{axis}

\end{tikzpicture}

but... most guass curves i see are about half this high

and usually only the domain ticks are shown

in this case only 1.28 needs be shown

really don't need what is here on the x-axis

since is basically already understood

also this code was c/p from Overleaf which is very common Latex editor among Universities

MHB has been a great help on this

\begin{tikzpicture}

%preamble \usepackage{pgfplots}

\newcommand\gauss[2]{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))} % Gauss function, parameters mu and sigma

\begin{axis}[every axis plot post/.append style={

mark=none,samples=50,smooth}, % All plots: 50 samples, smooth, no marks

axis x line*=bottom, % no box around the plot, only x axis

axis y line=none, % the * suppresses the arrow tips

enlargelimits=upper, % extend the axes a bit to the right and top

domain=-4:4] % Default for all plots: from -4:4

%\node [below] at (1.28,0) {$a$};%

\addplot [fill=cyan!30, draw=none, domain=1.28:4] {\gauss{0}{1}} \closedcycle;

\addplot {\gauss{0}{1}};

\end{axis}

\end{tikzpicture}

but... most guass curves i see are about half this high

and usually only the domain ticks are shown

in this case only 1.28 needs be shown

really don't need what is here on the x-axis

since is basically already understood

also this code was c/p from Overleaf which is very common Latex editor among Universities

MHB has been a great help on this

Last edited: