Skip to content

Instantly share code, notes, and snippets.

@momijiame
Created January 2, 2017 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save momijiame/cb6c88b0011cc8e643e2332c19923eb0 to your computer and use it in GitHub Desktop.
Save momijiame/cb6c88b0011cc8e643e2332c19923eb0 to your computer and use it in GitHub Desktop.
正規分布を描く
#!/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()
#!/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