여러 플롯
마지막 연습 문제에서는 1베드룸과 2베드룸 아파트의 공정 시장 임대료를 비교해 보겠습니다.
이 연습은 강의의 일부입니다
Seaborn으로 배우는 중급 데이터 시각화
연습 안내
- 두 개의 axes 객체
ax0와ax1을 생성하세요. ax0에는fmr_1을,ax1에는fmr_2를 그리세요.- 두 플롯을 나란히 표시하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Create a plot with 1 row and 2 columns that share the y axis label
fig, (ax0, ax1) = plt.subplots(nrows=____, ncols=____, sharey=____)
# Plot the distribution of 1 bedroom apartments on ax0
sns.histplot(df['____'], ax=____)
____.set(xlabel="1 Bedroom Fair Market Rent", xlim=(100,1500))
# Plot the distribution of 2 bedroom apartments on ax1
sns.histplot(df['____'], ax=____)
____.set(xlabel="2 Bedroom Fair Market Rent", xlim=(100,1500))
# Display the plot
plt.show()