将这段python代码运行后显示的边框变成中文import matplotlibpyplot as plt# 模拟数据years = 2015 2016 2018 2019 2020visitors = 105500 1200000 1400000 1600000 1800000# 绘制折线图pltplotyears visitors marker=o# 设置图形标题和坐标轴标签plttitle大
import matplotlib.pyplot as plt
模拟数据
years = [2015, 2016, 2018, 2019, 2020] visitors = [105500, 1200000, 1400000, 1600000, 1800000]
绘制折线图
plt.plot(years, visitors, marker='o')
设置图形标题和坐标轴标签
plt.title("大唐") plt.xlabel("年") plt.ylabel("万人")
显示图形
plt.show()
原文地址: https://www.cveoy.top/t/topic/fmHX 著作权归作者所有。请勿转载和采集!