데이터분석/dataframe.plot2 데이터프레임.plot xtick바꾸기 df1 = df_last.groupby('연도')['평당분양가격'].mean() fig=plt.figure(figsize=(10,3), dpi=100) # 액자설정 ax = fig.subplots(1,1) # 도화지설정 df1.plot.line(ax = ax) t1 = ax.get_xticks() #현재 그래프의 x들을 가져옴 t2 = [x for x in t1 if x.is_integer()] #t1에 소수점도많은데 int일때만 가져오기 ax.set_xticks(t2) # x다시설정 fig.tight_layout() 2023. 4. 13. 데이터프레임 2개 시각화 fig=plt.figure(figsize=(10,3), dpi=100) # 액자설정 ax1, ax2=fig.subplots(1,2) # 도화지설정 df1.plot.box(fontsize=15, ax=ax1) df1.plot.bar(fontsize=15, ax=ax2) fig.tight_layout() 파라미타에 ax = ax1, ax= ax2를 추가해줌으로써 연달아서 시각화 2023. 4. 13. 이전 1 다음