2

I have some data which I have plotted using plot(x,y,..) function. Now I want to superimpose three ellipse on this plot. I know the radius for every axis and I know the center for every ellipse.How can I create such ellipse in R. Not much help is available on Internet about this. I want the plot to look like this

Ved Gupta
  • 183
  • 3
  • 15

1 Answers1

3

I dont know what is your dataset is... So I have created random one... I used plotrix package for this...

library(plotrix)
df = data.frame(x=sample(1:25),y=sample(1:25,replace=T,25))
plot(df,col='blue')
draw.ellipse(x= c(15), y= c(15), c(4), c(3), border = 'black', lwd = 2)
draw.ellipse(x= c(15), y= c(15), c(5), c(4), border = 'green', lwd = 2)
draw.ellipse(x= c(15), y= c(15), c(6), c(5), border = 'red', lwd = 2)

I hope this will help you...

vrajs5
  • 4,066
  • 1
  • 27
  • 44