Skip to content

Instantly share code, notes, and snippets.

@SnowyPainter
Created May 8, 2021 00:56
Show Gist options
  • Save SnowyPainter/49c3dbf3fa5bb93a46521696767591ec to your computer and use it in GitHub Desktop.
Save SnowyPainter/49c3dbf3fa5bb93a46521696767591ec to your computer and use it in GitHub Desktop.
from matplotlib import pyplot as plt
import numpy as np
points = np.random.randint(-10, size=100 ,high=10)
disp = np.var(points)
print("분산 : {}".format(disp))
print("표준편차 : {}".format(np.sqrt(disp)))
plt.title("Number line", fontsize=15)
plt.scatter(points, np.full_like(points,0), color='red')
plt.xlabel("Number Line Points(x) y=0", fontsize=13)
plt.grid()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment