Drawing circles in R

后端 未结 1 1163
终归单人心
终归单人心 2020-12-20 03:01

I\'m using plotrix package to draw circles.

And I don\'t get what is wrong with my code... :-(

I have three points. The first point (1,1) should

相关标签:
1条回答
  • 2020-12-20 03:27

    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:

    enter image description here

    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.

    0 讨论(0)
提交回复
热议问题