سلام
در فایل کمینه ات دستور زیر رو ننوشتی باعث خطا شده.
\let\ds\displaystyle
ویرایش:
بصورت زیر:
\documentclass[12pt,a4paper]{report}
\usepackage{pgfplots}
\let\ds\displaystyle
\usepackage{caption}
%\usepackage{graphicx}
%\usepackage{subcaption}
\begin{document}
\begin{figure}[ht]
\centering
\begin{minipage}{.4\textwidth}
\centering
\begin{tikzpicture}[scale=.7]
\begin{axis} [
axis lines=middle,
inner axis line style={=>},
xlabel={\large $x$},
ylabel={\large $y$},
xticklabel style={inner xsep=.5pt, anchor=north east},
xtick={0,0.125,...,1.1},
ytick={-1,0,1},
xticklabel style={/pgf/number format/.cd,frac,frac TeX=\ds\frac,frac denom=8},
yticklabel style={/pgf/number format/.cd,frac,frac TeX=\ds\frac,frac denom=1},
ymin=-1.2,
ymax=1.2,
xmin=-0.1,
xmax=1.2]
\addplot[color=blue,ultra thick] coordinates {
(-0.1,0)
(0,0)
(0,1)
(1/8,1)
(1/8,-1)
(2/8,-1)
(2/8,0)
(1.125,0)
};
\end{axis}
\end{tikzpicture}
\captionof{figure}{\small{$ \psi_{2,0}=h_5(x)$}}
\end{minipage}
%
\begin{minipage}{.4\textwidth}
\centering
\begin{tikzpicture}[scale=.7]
\begin{axis} [
axis lines=middle,
inner axis line style={=>},
xlabel={\large $x$},
ylabel={\large $y$},
xticklabel style={inner xsep=.5pt, anchor=north east},
xtick={0,0.125,...,1.1},
ytick={-1,0,1},
xticklabel style={/pgf/number format/.cd,frac,frac TeX=\ds\frac,frac denom=8},
yticklabel style={/pgf/number format/.cd,frac,frac TeX=\ds\frac,frac denom=1},
ymin=-1.2,
ymax=1.2,
xmin=-0.1,
xmax=1.2]
\addplot[color=blue,ultra thick] coordinates {
(-0.1,0)
(0,0)
(0,1)
(1/8,1)
(1/8,-1)
(2/8,-1)
(2/8,0)
(1.125,0)
};
\end{axis}
\end{tikzpicture}
\captionof{figure}{\small{$ \psi_{2,0}=h_5(x)$}}
\end{minipage}
\end{figure}
\end{document}
خروجی: