0
我有一個散點圖,我需要添加一個圖例。它看起來像代碼是正確的,但它沒有被添加。有什麼想法嗎?需要幫助添加圖例使用R的散點圖
Dancenew<-subset(Dance, Type=="Lindy" | Type== "Blues" | Type=="Blues")
box.labels<-c("Lindy","Blues","Blues")
plot(Type~Count, pch=c(19,5,12), col=c("red","blue","green"), ylab="Dance Counts",
data=ausportnew, xlab="Dance Types", name=box.labels, main="Dancing for a Healthier You")
legend(Dancenew,c("Lindy","Blues","Contra"),pch=c(19,5,12),col=c("red","blue","green"))
你好的東西!你能否提供一個可重複的例子?我們沒有'舞蹈'對象。 http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example –