The code below creates a StreamPlot for a nonlinear system of first-order ODEs:
$\dot{x}=y,\dot{y}=x+\tfrac{1}{4}x^{2}$
I have created a simple zoom slider that expands the region about the critical point at $(x,y)=(0,0)$. In order to zoom about the other critical point at $(x,y)=(−4,0)$, I have written the system with a translation of $(x_0,y_0)$ to $(0,0)$. Unfortunately the location of the Ticks
do not shift accordingly. In particular, by translating the point $(x,y)=(−4,0)$ to $(x,y)=(0,0)$, I want the $x$ Tick
to be -4 instead of 0 and center the StreamPlot
at $(x_0,y_0)$. Can the Ticks
be translated accordingly? Translating the $u$ and $v$ intervals by $x_0$ and $y_0$ respectively doesn't do it.
Manipulate[
StreamPlot[{v + y0, (u + x0) + 1/4 (u + x0)^2}, {u, -r, r}, {v, -r,
r},
StreamScale -> Automatic,
AspectRatio -> 1,
ImageSize -> 500,
FrameLabel -> {x, y},
RotateLabel -> False,
LabelStyle -> Directive[FontFamily -> "Helvetica", 14],
StreamPoints -> Fine,
Epilog -> {{Red, PointSize[0.01],Point[{{-x0, -y0}, {-4 - x0, -y0}}]}}],
{{x0, 0, "x center"}, -6, 6, .01},
{{y0, 0, "y center"}, -6, 6, .01},
{{r, 6, "zoom"}, 6, 0.01, .01},
Button["Reset", {x0 = 0, y0 = 0, r = 6}]
]