diff --git a/2-9.py b/2-9.py index e3c5a88..298af4b 100644 --- a/2-9.py +++ b/2-9.py @@ -60,9 +60,9 @@ if __name__ == "__main__": hours = [hour for hour, count in hourly_404_counts_list] counts = [count for hour, count in hourly_404_counts_list] - # 使用 matplotlib 绘制条形图 + # 使用 matplotlib 绘制折线图 plt.figure(figsize=(10, 6)) - plt.bar(hours, counts, color='blue') + plt.plot(hours, counts, marker='o', color='b', linestyle='-', linewidth=2, markersize=6) plt.title('每小时404响应代码数量') plt.xlabel('小时') plt.ylabel('404响应次数')