matplotlib/seaborn: heatmap 히트맵
sns.heatmap()히트맵 예시attributessns.heatmap( fruit_dict, #values to make heatmap with cmap=cmap, #colormap annot=True, #annotation여부 linewidths=.5, #칸 사이사이 줄 두께 fmt='.1%' #퍼센트 표시 포매팅) example: step by step#making df#the amount of packs sold per day in a supermarketfruit_season = { 'Watermelon': [54,1037,515,6,34], 'Strawberry': [936,142,575,2009,56], 'Ora..
2025. 6. 6.
matplotlib/seaborn: bar chart 막대 그래프
plt.barplt.figure(figsize=(10,5))plt.plot(x=df['col_name'], y=df['col_name2'])plt.xlabel('col_name')plt.ylabel('col_name2')plt.xticks([2005,2010,2015,2020])plt.ylim(7,10)plt.savefig('figname.png', dpi=600) sns.barplot(data=df, x='열이름', y='열이름')#exampledf = sns.load_dataset('penguins')plt.figure(figsize=(10,5))sns.barplot(data=df, x='species', y='body_mass_g', hue="sex")plt.title('body mass per s..
2025. 6. 5.