import matplotlib.pyplot as plt
import numpy as np
import scipy.constants as const
#
X_ = np.linspace(-10,10)
Y_ = np.linspace(-10,10)
Z_ = np.linspace(-10,10)
#Quelle 1
x1=-2
y1=-5
q1=0.5
#Quelle 2
x2=2
y2=5
q2=-1

#Koordinatensystem
X,Y=np.meshgrid(X_, Y_,)
#Norm
R1=np.sqrt((x1-X)*(x1-X)+(y1-Y)*(y1-Y))
R2=np.sqrt((x2-X)*(x2-X)+(y2-Y)*(y2-Y))
#E-Feld
Ex=(1/(4*np.pi*const.epsilon_0))*(q1*(x1-X)/(R1*R1*R1)+q2*(x2-X)/(R2*R2*R2))
Ey=(1/(4*np.pi*const.epsilon_0))*(q1*(y1-Y)/(R1*R1*R1)+q2*(y2-Y)/(R2*R2*R2))

fig=plt.figure(figsize=(10,10))

plt.streamplot(X,Y,Ex,Ey,density=1, color=’blue‘, arrowsize =0.1)

plt.quiver(X,Y,Ex,Ey, color=’g‘)
plt.show()