forked from opencode18/HackerSkills
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added code for opencode18#4 for plotting sin wave
Added a python code to plot the sin graph
- Loading branch information
1 parent
509de56
commit d01eb45
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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() | ||
|