# 월별 각 게임 고객 수 시각화하기
ax = sns.barplot(data=grouped.reset_index(), x='date', y='Status', hue='Game_Name')
containers0 = ax.containers[0]
ax.bar_label(containers0, labels=[f'{x:,.0f}' for x in containers0.datavalues], label_type='center')
#containers = ax.containers[-1]
#ax.bar_label(containers, labels=[f'{x:,.0f}' for x in containers.datavalues], label_type='center')
plt.title('Customer Count by Game')
plt.show()

# 월별 각 게임 고객 수 시각화하기
ax = sns.barplot(data=grouped.reset_index(), x='date', y='Status', hue='Game_Name')
#containers0 = ax.containers[0]
#ax.bar_label(containers0, labels=[f'{x:,.0f}' for x in containers0.datavalues], label_type='center')
containers = ax.containers[-1]
ax.bar_label(containers, labels=[f'{x:,.0f}' for x in containers.datavalues], label_type='center')
plt.title('Customer Count by Game')
plt.show()

# 월별 각 게임 고객 수 시각화하기
ax = sns.barplot(data=grouped.reset_index(), x='date', y='Status', hue='Game_Name')
containers0 = ax.containers[0]
ax.bar_label(containers0, labels=[f'{x:,.0f}' for x in containers0.datavalues], label_type='center')
containers = ax.containers[-1]
ax.bar_label(containers, labels=[f'{x:,.0f}' for x in containers.datavalues], label_type='center')
plt.title('Customer Count by Game')
plt.show()

'visualization' 카테고리의 다른 글
정규화(Normalization)로 RFM Score 구하기 (0) | 2023.02.06 |
---|---|
matplotlib으로 누적 barplot 그리기 (0) | 2023.02.02 |
Matplotlib Subplot (0) | 2022.11.18 |
데이터의 빈도수 시각화 (0) | 2022.11.18 |
Matplotlib, Seaborn 시각화 (0) | 2022.11.18 |