[Tex/LaTex] Pgfplot axis and axis label cutomization

pgfplots

Well, simply, my code gives the graph below.
What I have.

But what I want is something like Fig. 30 (p. 56, Advanced Engineering Mathematics, 9th Ed. by Irvine Kreszig).

What I want

\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.

Best Answer

This is one attempt where the second set of pgfplotsset{....} is to set the font family and the following two commands is to rename the \figurename and numbering.

\renewcommand\figurename{Fig.}
\setcounter{figure}{29}

and x and y label position are allocated to location at (x,y) via

ylabel=$y$, y label style={at={(0.05,1)}},
xlabel=$t$, x label style={at={(1,0.3)}},

enter image description here

Code

\documentclass[]{article}

\usepackage{xcolor}
\usepackage{pgfplots}
\usepackage[eulergreek]{sansmath}        %%% newly added for font family
\pgfplotsset{
compat=newest, 
small, every non boxed x axis/.append style={x axis line style=-},
every non boxed y axis/.append style={y axis line style=-}
}

\pgfplotsset{                            %%% newly added for font family setting
  tick label style = {font=\sansmath\sffamily},
  every axis label = {font=\sansmath\sffamily},
%  legend style = {font=\sansmath\sfamily},
  label style = {font=\sansmath\sffamily}
}

\renewcommand\figurename{Fig.}
\setcounter{figure}{29}

\begin{document}
\begin{figure}
\begin{tikzpicture}%[inner sep=0.2cm]

\begin{axis}[
        axis lines= middle,
        ylabel=$y$, y label style={at={(0.05,1)}},  %%% newly added
        xlabel=$t$, x label style={at={(1,0.3)}},   %%% newly added
%        height=100pt,
        ymax=3, ymin=-1,
        minor y tick num=1,
        minor x tick num=1,     
        restrict y to domain=-20:20,
        width=8cm, height=5cm,                      %%% newly added 
]

\addplot[
    thick,
    orange,
    domain=0:15,
    samples=100,
%   fill=orange!60!white,
]
{(3-2*x)*exp(-0.5*x)};
\end{axis}
\end{tikzpicture}
\caption{Solution in Example 4}
\end{figure}

\end{document}
Related Question