Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plotting ODEs, Isoclines using Python

I am looking for a Python package that will allow me to plot something similar to the Java applet seen below:

http://math.mit.edu/mathlets/mathlets/isoclines/

Does anyone know any ODE plotting packages for this? I can code something from scratch using Numpy, Matplotlib, but I wanted to ask around first.

Thanks,

like image 573
BBSysDyn Avatar asked Sep 20 '25 03:09

BBSysDyn


1 Answers

I wrote something like this, it seems to work for y'=y^2-x

from pylab import *
xmax = 4.0
xmin = -xmax
D = 20
ymax = 4.0
ymin = -ymax
x = linspace(xmin, xmax, D)
y = linspace(ymin, ymax, D)
X, Y = meshgrid(x, y)
deg = arctan(Y**2 - X)
QP = quiver(X,Y,cos(deg),sin(deg))
show()

enter image description here

like image 192
BBSysDyn Avatar answered Sep 21 '25 17:09

BBSysDyn