mirror of
https://github.com/wahyd4/code-sandbox.git
synced 2026-08-09 05:07:03 +10:00
move python code snippets to python folder
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
plt.style.use("seaborn-whitegrid")
|
||||
|
||||
x = np.linspace(0, 10, 100)
|
||||
|
||||
figure = plt.figure()
|
||||
ax = plt.axes()
|
||||
sub1 = plt.subplot(2, 2, 1)
|
||||
sub1.plot(x, np.sin(x), "-", label="sin(x)")
|
||||
sub1.legend()
|
||||
|
||||
sub2 = plt.subplot(2, 2, 2)
|
||||
sub2 = plt.plot(x, np.cos(x), "o", label="cos(x)")
|
||||
sub2 = plt.legend()
|
||||
|
||||
plt.subplot(2, 2, 3)
|
||||
plt.plot(x, np.tan(x), "-", label="tan(x)")
|
||||
plt.legend()
|
||||
|
||||
|
||||
plt.show(block=True)
|
||||
Reference in New Issue
Block a user