Apologies I should've clarified with an example earlier.
output$graph <- renderPlotly({
shape <- data.frame(
x = c(50, 120, 90, 50),
y = c(15, 15, 90, 120))
p <- ggplot(shape, aes(x = x, y = y)) +
geom_curve(aes(x = 20, xend = 80, y = 15, yend = 15, curvature = 0.5, angle = 50, color = 'red')) +
geom_ellipse(aes(x0 = 0, y0 = 10, a = 10, b = 6, angle = pi / 2, m1 = 6)) +
coord_fixed() + xlim(0,10) + ylim(0,30)
p
})
I just found out that it doesnt work within the context of RenderPlotly. However it works if I change it to RenderPlot. This goes for the geom_ellipse function as well.
Gladly appreciate your advice on this, thank you.