Drawing circles in R

橙三吉。 提交于 2019-11-29 12:40:57
Ben Bolker

As @Baptiste says above, you can use plot(...,asp=1). This will only work if your x and y ranges happen to be the same, though (because it sets the physical aspect ratio of your plot to 1). Otherwise, you probably want to use the eqscplot function from the MASS package. A similar issue arises whenever you try to do careful plots of geometric objects, e.g. Drawing non-intersecting circles

This plot is produced by substituting MASS::eqscplot for plot in your code above:

Note that depending on the details of what R thinks about your monitor configuration etc., the circle may look a bit squashed (even though it goes through the points) when you plot in R's graphics window -- it did for me -- but should look OK in the graphical output.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!