2020. 9. 10. 18:16ใLearning archive/Data Science
๐๋ฐ์ดํฐ ์๊ฐํ, Matplotlib
๋ฐ์ดํฐ ์๊ฐํ๋ ๋ฐ์ดํฐ ๋ถ์ ๊ณผ์ ์์ ๋งค์ฐ ์ค์ํ ๋ถ๋ถ์ด๋ค. ํ๋ก์ ํธ ์ด๊ธฐ ๋จ๊ณ ๋๋ ๋ฆฌํฌํ ๋จ๊ณ์์ ํ์์ ๋ฐ์ดํฐ ๋ถ์(EDA)์ ์ผํ์ผ๋ก์, ๊ฒฐ๊ณผ๋ฅผ ๋ค๋ฅธ ์ฌ๋๊ณผ ๊ณต์ ํ ๋ ์ ์ฉํ๋ค. ๋ํ ๋ฐ์ดํฐ๋ฅผ ์๊ฐํํ๋ฉด ๋ณ์ ๊ฐ์ ๋ถํฌ๋ ๋ณ์ ์ฌ์ด์ ๊ด๊ณ๋ฅผ ํ์ธํ๊ณ ๋ชจ๋ธ๋ง์ ์ํ ๊ฐ์ค์ ๋์ถํ๋ ๋ฐ์๋ ๋์์ด ๋๋ค.
Matplotlib์ ๊ณ ํ์ง์ ๊ทธ๋ํ๋ฅผ ๋ง๋ค๊ธฐ ์ํ ๋ชฉ์ ์ ํจํค์ง์ด๋ค. ๋ง๋ ๊ทธ๋ํ, ์์๊ทธ๋ฆผ, ์ ๊ทธ๋ํ, ์ฐ์ ๋, ํ์คํ ๊ทธ๋จ ๋ฑ ๊ธฐ๋ณธ์ ์ธ ํต๊ณ ๊ทธ๋ํ๋ฅผ ๋ง๋ค ์ ์๊ณ , ๋ฐ์ดํฐ๋ฅผ ์ง๋์ ๋งคํํ๋ basemap ๋ฐ cartopy, ๊ทธ๋ฆฌ๊ณ 3D ๊ทธ๋ํ๋ฅผ ๋ง๋๋ mplot3d๊ฐ์ ๋๊ตฌ๋ ์ ๊ณตํ๋ค.
์ถ์ฒ : <ํ์ด์ฌ ๋ฐ์ดํฐ ๋ถ์ ์ ๋ฌธ> 279p.
Adding data to axes : plotting command
Customizing plots
- Customizing data ppearance (adding markers
๋ง์ปค ํ์ธํ๋ ๊ณณ : matplotlib.org/api/markers_api.html
matplotlib.markers — Matplotlib 3.3.1 documentation
matplotlib.markers Functions to handle markers; used by the marker functionality of plot and scatter. All possible markers are defined here: marker symbol description "." point "," pixel "o" circle "v" triangle_down "^" triangle_up "<" triangle_left ">" tr
matplotlib.org
๐ Setting : marker, linestyle, and color
๐๋ง์ปค, ๋ผ์ธ์คํ์ผ, ์ปฌ๋ฌ ์ง์ ํ๊ธฐ ์์ (Customizing the axes labels)
๐ x์ถ๊ณผ y์ถ์ ๋ผ๋ฒจ ๋ฌ๊ธฐ
๐ Small multiples : ์์ plot์ ์ฌ๋ฌ๊ฐ ๋ง๋ค์!
//small multiples with plt.subplots
fig, ax = plt.subplots()
๐ ์์ : Small multiples
๐ sharey=True : y์ถ์ ๋์ผํ๊ฒ ์ค์ ํ์
์ถ์ฒ : www.datacamp.com
Learn R, Python & Data Science Online
Learn Data Science from the comfort of your browser, at your own pace with DataCamp's video tutorials & coding challenges on R, Python, Statistics & more.
www.datacamp.com