主页 > IT业界  > 

2025年2月9日(数据分析_2)

2025年2月9日(数据分析_2)

散点图

from matplotlib import pyplot as plt from matplotlib import font_manager # 字体相关 # 字体 font_path = r"C:\Windows\Fonts\msyh.ttc" my_font = font_manager.FontProperties(fname=font_path) x = list(range(31)) x2 = list(range(31, 62)) a3 = [11, 17, 16, 11, 12, 11, 12, 6, 6, 7, 8, 9, 12, 15, 14, 17, 18, 21, 16, 17, 20, 14, 15, 15, 15, 19, 21, 22, 22, 22, 23] b10 = [26, 26, 28, 19, 21, 17, 16, 19, 18, 20, 20, 19, 22, 23, 17, 20, 21, 20, 22, 15, 11, 15, 5, 13, 17, 10, 11, 13, 12, 13, 6] # 绘图 _xtick_labels = ["3月{}号".format(i) for i in range(31)] _xtick_labels += ["10月{}号".format(i) for i in range(31, 62)] plt.xticks((x+x2)[::3], _xtick_labels[::3], rotation=45, fontproperties=my_font) plt.scatter(x, a3) plt.scatter(x2, b10) # 展示 plt.show()

散点图

from matplotlib import pyplot as plt from matplotlib import font_manager # 字体相关# 字体 font_path = r"C:\Windows\Fonts\msyh.ttc" my_font = font_manager.FontProperties(fname=font_path) # 参数 y_3 = [11, 17, 16, 11, 12, 11, 12, 6,
标签:

2025年2月9日(数据分析_2)由讯客互联IT业界栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“2025年2月9日(数据分析_2)