As part of the Developing Data Products course, I created a simple webpage with R Markdown that features an interactive Plotly plot. In this case, it is a sine wave as a 3D surface.
library(plotly)
## Warning: package 'plotly' was built under R version 4.4.2
## Loading required package: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
x <- seq(-10, 10, length.out = 100)
y <- seq(-10, 10, length.out = 100)
z <- outer(x, y, function(x, y) sin(sqrt(x^2 + y^2)))
plot_ly(z = ~z, x = ~x, y = ~y, type = "surface")