Created
January 2, 2017 19:01
-
-
Save momijiame/cb6c88b0011cc8e643e2332c19923eb0 to your computer and use it in GitHub Desktop.
正規分布を描く
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
from matplotlib import pyplot as plt | |
def main(): | |
x = np.arange(-5, 5.1, 0.1) | |
y = np.exp(-x ** 2 / 2) / np.sqrt(2 * np.pi) | |
plt.plot(x * 10 + 50, y) | |
plt.ylim(0, 0.5) | |
plt.xlim(0, 100) | |
plt.show() | |
if __name__ == '__main__': | |
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
from matplotlib import pyplot as plt | |
def main(): | |
x = np.arange(-4, 4.1, 0.1) | |
y = np.exp(-x ** 2 / 2) / np.sqrt(2 * np.pi) | |
plt.plot(x, y) | |
plt.ylim(0, 0.5) | |
plt.xlim(-4, 4) | |
plt.show() | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment