[참고 : ggplot 구문을 현대화 편집]을 더 ex1221new
이 있기 때문에
귀하의 예는 재현되지 않습니다 (Sleuth2
에 ex1221
가 없다, 그래서 나는 당신이 무슨 뜻인지 것 같다). 또한 열을 꺼내어 ggplot
으로 보내지 않아도됩니다. 한 가지 이점은 ggplot
이 data.frame
과 직접 작동한다는 것입니다.
xlab()
및 ylab()
으로 레이블을 설정하거나 scale_*.*
호출의 일부로 지정할 수 있습니다. labs
기능
ggplot(ex1221, aes(Discharge, Area)) +
geom_point(aes(size=NO3)) +
scale_size_area() +
labs(size= "Nitrogen",
x = "My x label",
y = "My y label",
title = "Weighted Scatterplot of Watershed Area vs. Discharge and Nitrogen Levels (PPM)")
를 사용하고 (당신이 저울의 다른 측면을 변경하지 않는 경우 편리)
ggplot(ex1221, aes(Discharge, Area)) +
geom_point(aes(size=NO3)) +
scale_size_area("Nitrogen") +
scale_x_continuous("My x label") +
scale_y_continuous("My y label") +
ggtitle("Weighted Scatterplot of Watershed Area vs. Discharge and Nitrogen Levels (PPM)")
library("Sleuth2")
library("ggplot2")
ggplot(ex1221, aes(Discharge, Area)) +
geom_point(aes(size=NO3)) +
scale_size_area() +
xlab("My x label") +
ylab("My y label") +
ggtitle("Weighted Scatterplot of Watershed Area vs. Discharge and Nitrogen Levels (PPM)")
단지 지정하는 또 다른 방법은 레이블
위의 그림에 대한 엔틱 한 그림.