import numpy as np
import matplotlib.pyplot as plt
import random
plt.figure(figsize=(5,5),dpi=80)
ax = plt.gca() # gca stands for 'get current axis'
ax.spines['right'].set_color('none')
ax.spines['top'].set_color('none')
ax.xaxis.set_ticks_position('bottom')
ax.spines['bottom'].set_position(('data',0))
ax.yaxis.set_ticks_position('left')
ax.spines['left'].set_position(('data',0))
X=[]
Y=[]
n=100000
for i in range(1,n+1,1):
x=random.random()
y=random.random()
if x*x+y*y<= 1.0 :
X.append(x)
Y.append(y)
plt.scatter(X,Y)
plt.show()