Python笔记:使用matplotlib,seaborn,plotly,pyecharts绘制同一种图形
我分别用 matplotlib, seaborn, plotly, pyecharts 这4个库来绘制同一种图形 ① matplotlib import matplotlib matplotlib.__version__ # '2.2.2' import matplotlib.pyplot as plt # import matplotlib as mp1 # 显示中文 plt.rcParams["font.sans-serif"] = [u"SimHei"] # mp1.rcParams["font.family"] = "STFangsong" # plt.rcParams["axes.unicode_minus"] = False # 在线显示matplotlib作出来的图形 %matplotlib inline plt.plot(["周一","周二","周三","周四","周五","周六","周日"], [1, 1.5, 4, -1.2, 0.8, 2.3, -2] ,c='red') plt.bar(["周一","周二","周三","周四","周五","周六","周日"], [2, 3, -1.5, -1.04, 4.2, 3,0.5] ) plt.show() # 保存图片 # plt.savefig(r"C:\Users\QDM\Desktop\混合图.jpg") #