September 2018
Beginner to intermediate
140 pages
2h 52m
English
In this section, we'll produce a color differentiated scatter plot with respect to a third variable. Let's begin by implementing the following steps:
dfs <- subset(df,Country %in%c("Germany","India","China","United States"))
p1<- ggplot(df,aes_string(x=var1,y=var2))+)geom_point(color=2,shape=2)+xlim(0,10000)+xlab(name1)+ylab(name2)
p2 <- ggplot(df,aes_string(x=var1,y=var2))+geom_t(aes(color=Country,shape=Country))+xlim(0,10000)+xlab(name1)+ylab(name2) ...Read now
Unlock full access