인프런 - 강의/청와대 청원 데이터 시각화

12 - wordcloud 그림그리기

개복치 개발자 2020. 3. 4. 21:12

일단 conda install -c conda-forge wordcloud 로 설치하시고

 

import matplotlib.pyplot as plt
from wordcloud import WordCloud

text = open('us.txt').read()

wordcloud = WordCloud().generate(text)

plt.figure(figsize=(12,12))
plt.imshow(wordcloud, interpolation = "bilinear")
plt.axis("off")
plt.show()

 

 

 

 

 

 

--참조

 

https://amueller.github.io/word_cloud/auto_examples/masked.html#sphx-glr-auto-examples-masked-py

https://pinkwink.kr/1029

https://busy.org/@anpigon/2

'인프런 - 강의 > 청와대 청원 데이터 시각화' 카테고리의 다른 글

13 - wordcloud 한글, 그림  (4) 2020.03.05
11 - Data 시각화하기  (0) 2020.03.02
10 - 실제 데이터 가공하기  (0) 2020.03.02
9 - 텍스트 가공하기  (0) 2020.03.02
8 - 단어 숫자 세기  (0) 2020.03.02