这是一个用 Python 和 Matplotlib 库画山水画的代码示例:
import numpy as np
import matplotlib.pyplot as plt
# Generate x and y values for the terrain
x = np.linspace(0, 10, 1000)
y = np.sin(x) + np.sin(3 * x) + 0.5 * np.random.randn(1000)
# Plot the terrain
plt.fill_between(x, y, 0, color='green', alpha=0.5)
pl