Hello my dear python enthusiasts,
I have a problem in my python program that I have been writing and I could use some help.
I want to Fit this code so it looks like the picture I uploaded, but I dont know how to to it.
Thank for the help.

Here is the code that i have been writing:
import random
import numpy as np
def chisq(ndof: int):
sqr=lambda x: x*x
cs=np.array([sqr(random.gauss(0,1))
for i in range(0,ndof) ]).sum()
return cs/ndof
ndof=2
nstat=100000
A=np.array([chisq(ndof) for i in range (0,nstat)])
A.sort();
for i in range (0,nstat):
print(A[i],1-i/nstat);