Is there a way to reproduce the following plot in R?
EDIT
This is what I could do with persp()
in base R and plot_ly
in plotly. Also a bit ugly.
x <- seq(0,1,0.01)
y <- seq(0,1,0.01)
f <- function(x,y){ z <- -x - y + 1 }
z <- outer(x,y,f)
z <- ifelse(z<0,NA,z)
persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = "lightblue")
plot_ly(x=x,y=y,z=z,type="surface") %>% layout(xaxis=list(range=c(0,1)), yaxis=list(range=c(0,1)), zaxis=list(range=c(0,1)))
BTW...the matplotlib plots were obtained here: http://blog.bogatron.net/blog/2014/02/02/visualizing-dirichlet-distributions/