ggplot 한글
https://statkclee.github.io/viz/viz-r-font.html
https://kkokkilkon.tistory.com/180 [꼬낄콘의 분석일지]
글꼴 설치
1. 한글 글꼴 설치 in OS
구글 본고딕(Noto Sans) https://fonts.google.com/specimen/Noto+Sans+KR
네이버 나눔고딕 …
font_book에 다운받은 글꼴 unzip후 Drag&Drop
2. 모든 글꼴 import in R
#install.packages("extrafont") library(extrafont) font_import() fonts()
ggplot 에 적용
theme_update(text=element_text(family="Noto Sans KR")) iris %>% ggplot(aes(x=`산업분류`)) + geom_bar() + \ttheme(axis.text.x=element_text(angle=90, hjust=1))
theme_set(theme_grey(base_family='NanumGothic'))
theme_set( hrbrthemes::theme_ipsum(base_size=9, base_family='Noto Sans KR') + theme( \t#text=element_text(family="Noto Sans KR"), #legend.position = "none", #axis.ticks = element_blank(), #panel.grid = element_blank(), panel.background = element_rect(fill="white") ) )