色相的威力

給試算表使用者的 Python

Chris Cardillo

Data Scientist

我們的漂亮長條圖

圖表

依門市營收(最終).png

圖表背後的資料

支撐基本圖表的資料.png

給試算表使用者的 Python

更細緻的長條圖

新圖表背後的資料

依水果與門市(依門市與名稱排序).png

給試算表使用者的 Python

更細緻的長條圖

新圖表背後的資料

依水果與門市(依門市與名稱排序).png

新圖表

依門市營收-水果分解.png

給試算表使用者的 Python

Hue(色相)

sns.barplot(x='store',
            y='revenue',
            data=fruit_store_summary,
            hue='product_name')

依門市營收-水果分解.png

給試算表使用者的 Python

plt.legend()

sns.barplot(x='store',
            y='revenue',
            data=fruit_store_summary,
            hue='product_name')

plt.legend(bbox_to_anchor=(1, 1))

依門市營收-水果分解.png

給試算表使用者的 Python

整合示範

sns.set_style('whitegrid')

sns.barplot(x='store',
            y='revenue',
            data=fruit_store_summary,
            hue='product_name')

plt.legend(bbox_to_anchor=(1, 1))

plt.title('Revenue by Store - Fruit Breakdown')
plt.xlabel('Store')
plt.ylabel('Revenue (USD)')
sns.despine()
plt.show()

依門市營收-水果分解.png

給試算表使用者的 Python

換你了!

給試算表使用者的 Python

Preparing Video For Download...