Can't create 3d surface with dataframe plot_ly

别等时光非礼了梦想. 提交于 2019-12-08 05:42:16

问题


I have been trying to create a 3d surface with plotly but I couldn't. What I did is the following:

dataf <- data.frame(x=as.numeric(1:50), y=as.numeric(1:50), z=as.numeric(1:5))

And then

plot_ly() %>% add_trace(data = dataf,  x=dataf$x, y=dataf$y, z=dataf$z, type="mesh3d" ) 

But the problem is that it prints me an empty graph.

Any help is appreciated.

来源:https://stackoverflow.com/questions/44449817/cant-create-3d-surface-with-dataframe-plot-ly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!