library(lcdiagrammer)
plot(0, 1, xlim = c(0, 1), ylim = c(0, 1),
type = 'n', ann = FALSE, asp = 1)
length <- 0.8
width <- 0.2
r <- rects(0.5, 0.5, angle=(45/180)*pi, length=length, width=width)
polygon(x=c(r$p1x, r$p2x, r$p3x, r$p4x), y=c(r$p1y, r$p2y, r$p3y, r$p4y))
text(x=c(r$p1x, r$p2x, r$p3x, r$p4x), y=c(r$p1y, r$p2y, r$p3y, r$p4y), label=c("P1", "P2", "P3", "P4"))
e <- elipses(0.5, 0.5, angle=(45/180)*pi, major = length/2, minor = width/2, res=100)
polygon(e$x, e$y, border=4)
points(0.5, 0.5, col=4, pch=4, cex=2)
abline(v = c(0.5, (0.5 - length/2), (0.5 + length/2)), h=0.5, lty=2, col="grey")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.