Well, simply, my code gives the graph below.
But what I want is something like Fig. 30 (p. 56, Advanced Engineering Mathematics, 9th Ed. by Irvine Kreszig).
\ssfamily
font for the tick label, axis label
position and a bit more space for it.
Preamble:
\usepackage{xcolor}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\pgfplotsset{small, every non boxed x axis/.append style={x axis line style=-},
every non boxed y axis/.append style={y axis line style=-}}
My code:
\begin{figure}
\centering
\begin{tikzpicture}
\begin{axis}[
axis lines= middle,
ylabel=$y$,
xlabel=$t$,
height=100pt,
ymax=3, ymin=-1,
minor y tick num=1,
minor x tick num=1,
restrict y to domain=-20:20,
]
\addplot[
thick,
orange,
domain=0:15,
samples=100,
% fill=orange!60!white,
]
{(3-2*x)*exp(-0.5*x)};
\end{axis}
\end{tikzpicture}
\caption{The sample function, $y=(3-2x)e^{-0.5x}$.}
\end{figure}
Sorry, if it's long a bit.