Skip to content

Issue with zooming when projection is set to orthographic #1513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aplowman opened this issue Apr 10, 2019 · 5 comments
Closed

Issue with zooming when projection is set to orthographic #1513

aplowman opened this issue Apr 10, 2019 · 5 comments
Labels
bug something broken

Comments

@aplowman
Copy link

aplowman commented Apr 10, 2019

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

@marcotama
Copy link

marcotama commented Apr 16, 2019

I think this was reported and fixed upstream, in the Javascript backend, a few weeks ago and the changes have just now made their way downstream, in plotly 3.8.0.

@jonmmease
Copy link
Contributor

Thanks @marcotama. @aplowman can you confirm whether the upgrade to 3.8.0 takes care of the issue for you?

@jonmmease jonmmease added bug something broken plotly.js labels Apr 16, 2019
@aplowman
Copy link
Author

Yes, verion 3.8.0 has done the trick! Thanks both.

@emmanuelle
Copy link
Contributor

can this issue be closed? I think so

@aplowman
Copy link
Author

aplowman commented Sep 5, 2019

Yes.

@aplowman aplowman closed this as completed Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

4 participants