Power BI 条形图组图加堆叠图
2020-09-03 本文已影响0人
Shirley_3ec8
添加python图,以下代码
import matplotlib.pyplot as plt
import numpy as np
index = np.arange(dataset.shape[0])
p1 =plt.bar(index,dataset["MC_fas"], width=0.3 , color='lightgreen')
p2 =plt.bar(index,dataset["SC_fas"], width=0.3 , color='limegreen')
plt.xticks(index,dataset["product"], rotation = 45)
bar_width = 0.3
p3 =plt.bar(index + bar_width, dataset["MC_simul_d"], width=0.3 , color='deepskyblue')
p4 =plt.bar(index + bar_width, dataset["SC_simul_d"], width=0.3 , color='dodgerblue')
plt.legend(["MC_fas","SC_fas","MC_simul","SC_simul"],loc=1)
plt.title('MC SC ')
plt.show()
