I have the following code, which brings me to the figure in the first image.
Now I would like to place the text (in this example: exp(x) and x²+2x+1) of the legend entries underneath the red and blue lines (like in the second Image) and not next to the lines.
\documentclass{article}
\usepackage{pgfplots}
\usepackage{tikz}
\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}
\begin{axis}[
ymajorgrids,
xmin = 0, xmax = 8,
ymin = 0, ymax = 100,
legend style = {at = {(0.15,-0.2)}, anchor = west, draw = none},
legend columns = 2,
]
\addplot[color=red]{exp(x)};
\addlegendentry{exp(x)}
\addplot [domain=-10:10, samples=100, color=blue] {x^2 + 2*x + 1};
\addlegendentry{\(x^2 + 2x + 1\)}
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}
Is there a simple way to achieve that?

