同一个点图中的2个数据帧具有不同的颜色

时间:2016-09-02 13:19:19

标签: r ggplot2 panel

我有多个图表,我想将它们全部显示在一个图表中。我想让每个图形的点都有不同的颜色。

每个代码都是这样的:

g6p <- ggplot(g6, aes(g6$greater6, g6$greater6.1), xlim = c(-100,100), ylim=c(-100,100))
g6p + geom_point() + coord_cartesian(xlim = c(-100, 100), ylim = c(-100, 100), expand = FALSE)


ts <- read.csv("",stringsAsFactors=F, header=T)
s30 <- data.frame(x=((ts+3000)* 5 / 24 / 60 * 2 * pi *cos((ts + 3000) * 5 / 24 / 60 * 2 * pi)), y=((ts + 3000)* 5 / 24 / 60 * 2 * pi *sin((ts + 3000) * 5 / 24 / 60 * 2 * pi)))
s30p <- ggplot(s30, aes(s30$thirty, s30$thirty.1), xlim = c(-100,100), ylim=c(-100,100))
s30p + geom_point() + coord_cartesian(xlim = c(-100, 100), ylim = c(-100, 100), expand = FALSE) + ggtitle("Event: Steps > 30") + labs(x="", y="")


ts <- read.csv("",stringsAsFactors=F, header=T)
s40 <- data.frame(x=((ts+3000)* 5 / 24 / 60 * 2 * pi *cos((ts + 3000) * 5 / 24 / 60 * 2 * pi)), y=((ts + 3000)* 5 / 24 / 60 * 2 * pi *sin((ts + 3000) * 5 / 24 / 60 * 2 * pi)))
s40p <- ggplot(s40, aes(s40$fourty, s40$fourty.1), xlim = c(-100,100), ylim=c(-100,100))
s40p + geom_point() + coord_cartesian(xlim = c(-100, 100), ylim = c(-100, 100), expand = FALSE) + ggtitle("Event: Steps > 40") + labs(x="", y="")

`

请帮忙,

0 个答案:

没有答案