Skip to content

Issue with zooming when projection is set to orthographic #1513

Description

@aplowman

Using the following code in a Jupyter notebook:

from plotly import __version__
from plotly import graph_objs as go

print('version: ', __version__)

data = [
    {
        'type': 'scatter3d',
        'x': [0, 1, 2],
        'y': [0, 1, 2],
        'z': [0, 1, 2],
    },
]

layout = {
    'scene': {
        'camera': {
            'projection': {
                'type': 'orthographic',
            }
        }
    },
}

fw = go.FigureWidget(data=data, layout=layout)
fw

version: 3.7.1

The resulting FigureWidget does not seem to zoom properly, as can be seen in the below GIF. When projection is set to perspective, there is no problem with zooming.

plotly_fw_orthographic_projection_problem

EDIT: to be more specific, it seems like when using orthographic projection, we can't zoom out from the original camera position. See the below GIF, where I start with perspective projection (where I can zoom out) and then switch to orthographic projection (where I can't zoom out beyond the original level). It could be possible I am misunderstanding something about orthographic projection however.

plotly_fw_orthographic_projection_problem_2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions