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.
嘿,我想在 R 中画几个不同半径的圆。
我用'plotrix'和draw.circle做了这个:
draw.circle (0,0,1) draw.circle (0,0,1.5) draw.circle (0,0,2) ...
你知道更快更聪明的方法吗?
draw.circle似乎接受输入向量,因此请使用任何方便的函数来制作输入序列并将其传递给函数。
draw.circle
plot(0,0,type = "n", xlim = c(-10,10), ylim = c(-10,10)) draw.circle (0,0,seq(0,4,.5))