Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R I';我试图用matplot函数创建一个点图。X成为变量,Y是数量。顺序颠倒了_R - Fatal编程技术网

R I';我试图用matplot函数创建一个点图。X成为变量,Y是数量。顺序颠倒了

R I';我试图用matplot函数创建一个点图。X成为变量,Y是数量。顺序颠倒了,r,R,我正试图创建一个点图,但我的代码中有一个bug。我看不出有什么错误 data1<-cbind(c(1,3,5),c(10,2,3)) dim(data1) matplot(data1,1:3,pch=20,xlim=c(0,1),yaxt="n", xaxt="n", xlab = "Number of trees by ratio", ylab ="Tree type",

我正试图创建一个点图,但我的代码中有一个bug。我看不出有什么错误

data1<-cbind(c(1,3,5),c(10,2,3))
dim(data1)

matplot(data1,1:3,pch=20,xlim=c(0,1),yaxt="n", xaxt="n", 
        xlab = "Number of trees by ratio", ylab ="Tree type", 
        ylim = c(1,3), main="Tree concentrations in MI",col="blue","green")

data1
col
应该是
col=c(“蓝色”、“绿色”)
。如果需要,将
xlim
更改为
c(0,10)
以包括
data1
的所有点