简体   繁体   中英

3D Bubble Chart in R Plotly

I am struggling with developing a 3D bubble chart in R plotly. Plotly has a nice tutorial in python, but I have been unable to replicate in R.

library(plotly)
plot_ly(mtcars, x=mpg, y=cyl, z=disp, type='scatter3d', mode='markers',
        marker=list(sizemode='diameter', sizeref=750, size=hp, color=drat, 
                    colorscale = 'Viridis'))
library(plotly)
plot_ly(mtcars, x=mpg, y=cyl, z=disp, type='scatter3d', mode='markers',
        sizemode='diameter', size=hp, color=drat, colorscale = 'Viridis')

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM