I would like to magnify a function plot, but in the magnified area I would like to draw a different plot. As an example, I edited an image taken from another discussion on TeX Stack Exchange
I have looked into the spy library, but the documentation does not mention this particular use.
EDIT: A minimal working example would be
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot coordinates
{(0,0) (3,4)};
\end{axis}
\end{tikzpicture}
\end{document}
as a base plot, while the magnifying glass would need to display, for example the plot produced by
\begin{tikzpicture}
\begin{axis}
\addplot[smooth] coordinates
{(0,0) (1,0.25) (1.5, 0.5) (2,1)};
\end{axis}
\end{tikzpicture}

