mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-12 22:25:52 +00:00
massive transfer of risk-reliability book
This commit is contained in:
parent
6697c0f5f8
commit
3d24a01439
152 changed files with 57886 additions and 0 deletions
12
book/code/cosinewave.py
Normal file
12
book/code/cosinewave.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
x = np.linspace(0, 2*np.pi, endpoint=True)
|
||||
y = np.cos(x)
|
||||
|
||||
plt.figure()
|
||||
plt.plot(x, y)
|
||||
plt.title('$y=\cos(x)$')
|
||||
plt.xlabel('$x$')
|
||||
plt.ylabel('$y$')
|
||||
plt.savefig('cosinewave.svg')
|
||||
Loading…
Add table
Add a link
Reference in a new issue