Created
June 30, 2015 14:24
-
-
Save cocomoff/a89c4034b3d5961ace6a to your computer and use it in GitHub Desktop.
グラフ( http://blog-imgs-27-origin.fc2.com/r/i/v/riverocean/sa.png )を再現するPythonスクリプト
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
# -*- coding: utf-8 -*- | |
# author: @cocomoff | |
# date: 30/06/2015 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
if __name__ == '__main__': | |
x = np.arange(-50, 50, 1, dtype='float') | |
z = x / 10.0 | |
y = z * z - np.cos( 5 * np.pi * z ) | |
fig = plt.figure(figsize=(7,7)) | |
plt.plot(y, 'ro-') | |
plt.savefig('graph.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment