I'm looking to visualize slope fields of differential equations for my differential equations course. Every example I see draws them as vectors, adding unnecessary "arrows" that, to me, are visually distracting. Is there a way to plot these slope fields without the "arrows" that get in the way?
Answer
You can use the options VectorScale
and VectorStyle
of VectorPlot
. To create the slope field for the first order equation $y'=f(x,y)$, I usually do something like so.
f = Exp[-x] - y;
VectorPlot[{1, f}, {x, -2, 2}, {y, -2, 2},
VectorScale -> {0.03, Automatic, None},
VectorStyle -> {Gray, Arrowheads[0]}]
Comments
Post a Comment