import matplotlib.pyplot as plt
import numpy as np
#number of random points
n = 100000
x1 = [np.random.random() for i in range(n)]
x2 = [np.random.random()*2*np.pi for i in range(n)]
y1 = np.zeros(n)
y2 = np.zeros(n)
for i in range(n):
y1[i] = (np.sqrt(-2*np.log(x1[i]))*np.sin(x2[i]))
y2[i] = (np.sqrt(-2*np.log(x1[i]))*np.cos(x2[i]))
fig, ax = plt.subplots(subplot_kw={'aspect': 'equal'})
ax.set_xlim(-4, 4)
ax.set_ylim(-4, 4)
plt.scatter(y1,y2,c='b',s=3,alpha=0.1,edgecolors='none')
plt.show()