2017-08-06 87 views
1

如果我运行显示此我想多线(剧情,Contourseries)

from sympy import * 
from sympy.plotting import * 
from sympy.plotting.plot import * 

x, y = symbols('x y') 
f = Function('f') 
g = Function('g') 

f = 1/((x+0.3)**2 + y**2) - 1/((x-0.3)**2 + y**2) 
g = 1/sqrt((x+0.3)**2 + y**2) - 1/sqrt((x-0.3)**2 + y**2) 

p0 = Plot(ContourSeries(f,(x,-1.5,1.5),(y,-1.5,1.5))) 
p1 = Plot(ContourSeries(g,(x,-1.5,1.5),(y,-1.5,1.5))) 

p0.show() 

p1.show() 

enter image description here

只有狭窄的区域。

我想显示广泛的区域和更多的线条。

我该如何解决? (图片为p0)

+0

你是什么意思与“狭窄的区域”有这里没有显示的行? –

回答

0

您将x和y的限制设置为[-1.5; 1.5]。选择x和y更一致的时间间隔:

p0 = Plot(ContourSeries(f,(x,-.4,.4),(y,-.01,.01))) 
p1 = Plot(ContourSeries(g,(x,-.4,.4),(y,-.01,.01))) 

enter image description here

+0

我的意思是,该行不出现在x = -0.4,x = -1,x = -1.3 ... –