3D Camera Controls in Python - Perspective

Hi Everyone,

I was wondering if there was a setting to show the surface plot without perspective. The goal is to view the surface plot from above, or the side without perspective hiding parts of the view. The image below shows the perspective I am trying to remove.

image

Ideally, I want to have button callbacks on the plot to change perspective view quickly, rather than the user needing to rotate the surface plot.

Thanks in advance for any advice!

Found the answer!

There is a projection setting called camera_projection_type. It’s set by default to perspective. To change it to orthographic in dash/python:

    fig = go.Figure(data=[go.Surface(
        x=x_grid,
        y=y_grid,
        z=z_grid
        )
    ])
    fig.update_scenes(camera_projection_type='orthographic')