I am trying to add a horizontal line at y=1
and a vertical line at x=1
to my contour plot, how do I do this?
My code looks the following way:
library(plotly)
library("mvtnorm")
cov=matrix(c(2,1,1,2),2,2)
x1=seq(-4,4,by=0.1)
x2=seq(-4,4,by=0.1)
d<-expand.grid(x1,x2)
z=dmvnorm(as.matrix(d),sigma=cov)
plot_ly(x=d[,1],y=d[,2],z=z,type="contour")