Hi,
I'm using the code below to create an ellipses chart (using the Cluster package).
It works well except the ellipses hull can extend beyond the x&y axis.
Is there a way to extend the axis to ensure the ellipse hull doesn't fall outside the axis?
I've tried playing with xaxs but it seems the only settings in R are R (regular) and I (Internal).
Any ideas?
I'm using the code below to create an ellipses chart (using the Cluster package).
It works well except the ellipses hull can extend beyond the x&y axis.
Is there a way to extend the axis to ensure the ellipse hull doesn't fall outside the axis?
I've tried playing with xaxs but it seems the only settings in R are R (regular) and I (Internal).
Any ideas?
Code:
x <- rnorm(100)
xy <- unname(cbind(x, rnorm(100) + 2*x + 10))
exy <- ellipsoidhull(xy)
plot(xy,xlab="Appointment", ylab="Sales", main = "Performance Report", type='n')
# type = 'n' for no plots
# type = 'p' for points
lines(predict(exy), col="blue")
points(rbind(exy$loc), col = "blue", cex = 2, pch = 13)