Starting from my old question where I have modificated some parameters,
I have not understood the reason because the center of the spy is not in $(4,3.5)$ but it is closer at the point $(3.2,3)$ (this value is given by me after different compilations).
\spy[green!70!black,size=2cm] on (3.2,3) in node [fill=white] at (8,1);
After there is the main question:
Is it possible to have with the library of TikZ, \usetikzlibrary{spy}, a sequence of differents rectangular zoom as into this image with the same direction (it is taken from the book CALCULUS of JAMES STEWART 7th edition),
where is it possible to have the labels of the zoom as into this question (very great answer of the user @Tobi)?
Here I adding my MWE with the relative screenshot.
\documentclass{article}
\usepackage{tikz,amsmath,xcolor}
\usetikzlibrary{patterns}
\usepackage{pgfplots}
\usetikzlibrary{spy}
\begin{document}
\begin{tikzpicture}[spy using outlines={circle=.5cm, magnification=3, size=.5cm, connect spies}]
\tikzset{
hatch distance/.store in=\hatchdistance,
hatch distance=10pt,
hatch thickness/.store in=\hatchthickness,
hatch thickness=2pt
}
\makeatletter
\pgfdeclarepatternformonly[\hatchdistance,\hatchthickness]{flexible hatch}
{\pgfqpoint{0pt}{0pt}}
{\pgfqpoint{\hatchdistance}{\hatchdistance}}
{\pgfpoint{\hatchdistance-1pt}{\hatchdistance-1pt}}%
{
\pgfsetcolor{\tikz@pattern@color}
\pgfsetlinewidth{\hatchthickness}
\pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
\pgfpathlineto{\pgfqpoint{\hatchdistance}{\hatchdistance}}
\pgfusepath{stroke}
}
\makeatother
\begin{axis}[
xmin=-4,xmax=4,
xlabel={},
ymin=-3,ymax=3,
axis on top,
legend style={legend cell align=right,legend plot pos=right}]
\begin{scope}
\spy[green!70!black,size=2cm] on (3.2,3) in node [fill=white] at (8,1);
\end{scope}
\addplot[color=gray,domain=-4:4,samples=100] {x^3};
\end{axis}
\end{tikzpicture}
\end{document}



