** Veillez à ne pas confondre sous-parcelle avec sous-parcelle **
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('seaborn-whitegrid')
%matplotlib inline
#Préparez les données
t = np.linspace(-np.pi, np.pi, 1000)
x1 = np.sin(2*t)
x2 = np.cos(2*t)
x3 = np.tan(2*t)
x4 = 1 / x1
x5 = 1 / x2
x6 = 1 / x3
fig, axes = plt.subplots(2, 3, figsize=(16,12))
l = [[x1, x2, x3], [x4, x5, x6]]
for i in range(2):
for j in range(3):
axes[i][j].plot(t, l[i][j])
axes[i][j].set_xlim(-np.pi, np.pi)
axes[i][j].set_ylim(-1, 1)
fig, axes = plt.subplots(3, 2, figsize=(8,12))
l = [[x1, x2], [x3, x4], [x5, x6]]
for i in range(3):
for j in range(2):
axes[i][j].plot(t, l[i][j], color='r')
axes[i][j].set_xlim(-np.pi, np.pi)
axes[i][j].set_ylim(-1, 1)
Recommended Posts