Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
任意の座標範囲で (左下隅から右上隅まで) 対角線をプロットするにはどうすればよいでしょうか?
例えば
> plot(c(-2,3), c(-1,5), type = "n", xlab="x", ylab="y", asp = 1)
また
> plot(c(0,1000), c(0,334), type = "n", xlab="x", ylab="y", asp = 1)
私は次のことを試みましたが失敗しました:
> abline(0,1,col="red")
現在のプロット領域の制限はにありpar()$usrます。
par()$usr
lines( par()$usr[1:2], par()$usr[3:4] )