How to specify camera perspective of 3d plotly chart in R?

后端 未结 2 1578
悲&欢浪女
悲&欢浪女 2021-01-18 02:05

I would like to change the default camera perspective of my plotly 3d scatter plot, it is not clear from the help how this should be done. I understand the layout parameters

2条回答
  •  旧时难觅i
    2021-01-18 03:00

    In python, I set the default camera like so:

    scene=dict(cameraposition=[[-0.1, 0.5, -0.7, -0.2], [0.0, 0, 0.0], 2.8])
    

    The first 4 numbers are rotation, the next 3 are x,y,z translation, and the final number is zoom. It was hard for me to find documentation as well; this was the best I found: https://plot.ly/python/3d-plots-tutorial/#in-[7]

提交回复
热议问题