plotly / orca

Command line application for generating static images of interactive plotly charts
MIT License
296 stars 39 forks source link

How to change 3D figure perspective in orca plotly #265

Closed Yulin-bio closed 4 years ago

Yulin-bio commented 5 years ago

Hi,

I'm using local export to export 3d plot from plotly by orca. Is it possible to change the 3d plot perspective before I export the figure? I can only export figure in default angle.

Many thanks!

antoinerg commented 4 years ago

@archmoj I think you can answer this one. How do we change the camera position in plotly.js?

archmoj commented 4 years ago

@Yulin-bio Could you try the line below?

orca graph '{ "data": [{"type": "surface", "x": [0,1], "y": [0, 1], "z": [[0,1], [1,0]]}], "layout": { "scene": { "camera": { "eye": { "x": 3, "y": 2, "z": 1 } }  } } }' -o fig.png
antoinerg commented 4 years ago

Thank you @archmoj for providing an example showing how to change the camera position in plotly.js

@Yulin-bio since this is not an Orca issue, I will close it for now. Feel free to open an issue over at https://github.com/plotly/plotly.js if you find issues with the camera positioning.