This problem raises a couple of issues for me. First, I am trying to place labels on a graph and I am having no success. Here is the code I've tried:
\documentclass[11pt,reqno]{amsbook}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\pgfmathdeclarefunction{gaussPDF}{2}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
}
\begin{tikzpicture}
\begin{axis}[every axis plot post/.append style={
mark=none,domain=-5:5,samples=50,smooth},
axis x line*=bottom,
xlabel=$x$,
xlabel style={at={(axis description cs:1,0)}},
ylabel=${f_X(x:c,d)}$,
axis y line*=middle,
enlargelimits=upper]
\addplot[red] {gaussPDF(0,1)};
\end{axis}
\end{tikzpicture}
\end{document}
The xlabel style line is lifted directly from an answer to a similar question here: Positioning of Pgfplot axis labels.
My immediate problem is to place the y label on the top of the y-axis, centered and horizontal.
My more fundamental problem is that the PGFplots manual I have (v 1.4.1, 2010) doesn't help me figure these things out. On page 191 it addresses x/ylabel style ={}
but I can't find a list of the keys that go in the {}
or what they mean, or how to configure them. The answer in the link didn't say what 'cs' means but it did suggest that the first number following it positions the label between the origin (0) and the end of the axis (1). The second number seems to be a vertical displacement. This is a very inefficient way to figure these things out and I can't seem to parley the xlabel style line into the ylabel style line I need.
What's frustrating is that clearly many people do know these thing so it's knowable. Could someone point me at a better manual and/or a list of keys for each of the options for all of the commands that have same? I'm at the point in my work where I will need pgfplots a lot, and it will be a nightmare for me, and a monumental waste of this resource, if I'm posting questions all the time. It may just be me but I find the manual difficult to navigate, all thanks and gratitude genuinely offered to the authors.
Edit: adding a screen shot of output: