1
ggplot2에서 theme()을 사용하는 데 문제가 있습니다. 파란색 플롯 제목과 축 제목에 근무하는 색을 설정ggplot2의 텍스트 크기; 테마 문제()
ggplot(data=graph.data, aes(Tree, Proportion))
+ geom_bar(stat="identity", fill="black")
+ geom_errorbar(data=graph.data, mapping=aes(x=Tree, ymin=Proportion-SE, ymax=Proportion+SE), width=0.255)
+ labs(title="Corrected mean LdNPV mortality", x="Tree line", y="Percent mortality")
+ geom_text(aes(x=Tree, y=Proportion+SE+0.05, label=Letters))
+ theme(text=element_text(color="blue", size=12))
,하지만 축 텍스트 :
여기 줄거리입니다. 또한 플롯 제목의 크기는 축 텍스트보다 큰 축 제목의 크기보다 크게 유지됩니다. 크기를 20으로 늘리면 플롯 제목, 축 제목 및 축 텍스트가 증가하지만 균일 한 크기가 아닙니다. 무슨 일이야?
재현 예 :
이cities <- c("New York", "Tokyo", "London")
number <- c(20, 50, 35)
letter <- c("a", "b", "ab")
dummy.data <- data.frame(cities, number, letter)
ggplot(data=dummy.data, aes(cities, number)) +
geom_bar(stat="identity", fill="black") +
labs(title="Plot title", x="X axis title", y="Y axis title") +
geom_text(aes(x=cities, y=number+5, label=letter)) +
theme(text=element_text(color="blue", size=12))
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – shayaa