import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 10, 100)
y1 = np.sin(x)
y2 = np.cos(x)
y3 = np.tan(x)
fig, axs = plt.subplots(2, 2, figsize=(10, 8))
axs[0, 0].plot(x, y1, label='sin(x)')
axs[0, 0].set_title('Sine Function')
axs[0, 0].legend()
axs[0, 1].plot(x, y2, label='cos(x)', color='green')
axs[0, 1].set_title('Cosine Function')
axs[0, 1].legend()
axs[1, 0].plot(x, y3, label='tan(x)', color='red')
axs[1, 0].set_title('Tangent Function')
axs[1, 0].legend()
axs[1, 1].plot(x, y1, label='sin(x)')
axs[1, 1].plot(x, y2, label='cos(x)', color='green')
axs[1, 1].set_title('Sine and Cosine Functions')
axs[1, 1].legend()
plt.tight_layout()
plt.show()
