Skip to content

Commit

Permalink
Added code for opencode18#4 for plotting sin wave
Browse files Browse the repository at this point in the history
Added a python code to plot the sin graph
  • Loading branch information
rahulkumaran authored Jan 14, 2018
1 parent 509de56 commit d01eb45
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Binary file added Solutions/rahulkumaran/Task4/sin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions Solutions/rahulkumaran/Task4/sin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import matplotlib.pyplot as plt
import numpy as np

xRange = np.arange(0.0,2.0,0.01)
sinGraph = np.sin(2*np.pi*xRange)

plt.plot(xRange,sinGraph)

plt.title('A sin graph plot')
plt.grid(True)
plt.savefig("sin.png")
plt.show()

0 comments on commit d01eb45

Please sign in to comment.