# 以下三行使编译器能够绘图:
import sys
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
# 创建y轴数据点
ypoints = np.array([3, 8, 1, 10])
# 绘制带标记的折线图(使用品红色圆形标记)
plt.plot(ypoints, marker='o', ms=20, mec='hotpink', mfc='hotpink')
plt.show()
# 以下两行使编译器能够输出图形:
plt.savefig(sys.stdout.buffer)
sys.stdout.flush()