我如何覆蓋AverageTime2與AverageCost和AverageTime1與AverageCost的散點圖。 (在ggplot)?覆蓋兩張圖(ggplot)
Type<-c("a","b","c","d","e","f","g","h","i","j","k")
AverageTime<-c(12,14,66,123,14,33,44,55,55,6,66)
AverageTime2<-c(14,15,66,126,14,100,144,55,55,16,90)
AverageCost<-c(100,10000,400,20000,500000,5000,700,800,400000,500,120000)
AverageCost2<-c(10000,10000,4000,20000,5000,50000,7000,8000,40000,50000,120000)
df<-data.frame(Type,AverageTime,AverageTime2,AverageCost,AverageCost2)
將您的數據融入長格式。任何人都有一個很好的常見問題欺騙? – Gregor
可能的重複,儘管它是一個更復雜的情況:http://stackoverflow.com/q/1313954/903061 – Gregor
兩個'geom_point'圖層。 'ggplot(data = df)+ geom_point(aes(AverageCost,AverageTime),color ='red')+ geom_point(aes(AverageCost,AverageTime2),color ='blue')' – alistaire