**코드**
housing.plot(kind='scatter', x='longitude', y='latitude', alpha=0.4,
s=housing['population']/100, label='population', figsize=(10,7),
c='median_house_value', cmap=plt.get_cmap('jet'), colorbar=True,
sharex=False)
# s : 원의 반지름 (구역의 인구)
# c : 색상 (가격)
# cmap : color map 중 파랑(낮은)에서 빨강(높음)까지 범위를 나타내는 'jet'
plt.legend()
'ML , DL > Matplotlib' 카테고리의 다른 글
Matplotlib의 기본 scheme 대신 seaborn scheme (0) | 2021.10.19 |
---|---|
matplotlib의 axvline (0) | 2021.10.19 |
matplotlib의 subplot, ax 설정 (0) | 2021.10.19 |
matplotlib 그래프 크기 조정 및 xticks 회전 (0) | 2021.10.19 |
matplotlib의 legend 위치 조정 (0) | 2021.10.19 |