from matplotlib import pyplot as plt #plot
fig = plt.figure(figsize=(20,25))
p = sns.relplot("oper_date", "bg_purch_qty", data=df_plot, estimator=None, kind='line', col='goods_cd', col_wrap=5)
x_dates = df_plot['oper_date'].dt.strftime('%y-%m').sort_values().unique()
p.set_xticklabels(label=x_dates, rotation=45, ha='right')
stackoverflow.com/questions/51105648/ordering-and-formatting-dates-on-x-axis-in-seaborn-bar-plot
'언어 꿀Tip > Python 꿀tip!' 카테고리의 다른 글
07_01_11. pickle 형태로 내보내기 / 불러오기 (0) | 2021.02.26 |
---|---|
07_01_10. jupyter notebook terminal에서 폴더 삭제 (0) | 2021.02.22 |
07_01_07. aws 한글 폰트 지정 (0) | 2021.02.08 |
07_01_06. multi columns flatten ex) pd.pivot_table (0) | 2021.02.08 |
07_01_09. index filtering (0) | 2021.02.08 |