Skip to content

Instantly share code, notes, and snippets.

@cocomoff
Created June 30, 2015 14:24
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 cocomoff/a89c4034b3d5961ace6a to your computer and use it in GitHub Desktop.
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スクリプト
# -*- 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