本文介绍了使用Python绘制ODE,等高线图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个Python软件包,该软件包将允许我绘制类似于以下所示的Java applet的内容:

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/

有人知道为此的任何ODE绘图软件包吗?我可以使用Numpy,Matplotlib从头开始编写代码,但是我想先问一下.

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.

谢谢

推荐答案

我写了这样的内容,它似乎适用于y'= y ^ 2-x

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()

这篇关于使用Python绘制ODE,等高线图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 03:56