Skip to content
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

autorange='reversed' in scatter3d #803

Closed
lperozzi opened this issue Jul 26, 2017 · 8 comments
Closed

autorange='reversed' in scatter3d #803

lperozzi opened this issue Jul 26, 2017 · 8 comments
Milestone

Comments

@lperozzi
Copy link

Hi,

it seems that the option autorange='reversed' is not working with scatter 3D. Is there another solution to invert the zaxis?

@cldougl
Copy link
Member

cldougl commented Jul 26, 2017

Hi there,
Reversed axes are not supported for 3D (https://community.plot.ly/t/reverse-z-axis-values/1817/2) in our core plotly.js library.

@lperozzi
Copy link
Author

Ok, got it. The solution (for now), to plot X,Y,Z geospatial data in scatter 3D, with the depth assigned to the zaxis and having a depth (Z) increasing from the top of the plot is to make your Z values negative (e.g, df['Depth'] = -df['Depth'])

@jonmmease
Copy link
Contributor

Going to close this here since 'reversed' autorange support would need to be implemented in Plotly.js first (https://github.com/plotly/plotly.js). Feel free to search the issues there and open a new one if this use case isn't covered yet. Thanks!

@VelizarVESSELINOV
Copy link

Your colleagues from plotly.js are now managing correctly reversed axis in 3D space plotly/plotly.js#1940. @jonmmease do you need to reopen the issue or we need to create a new issue or automatically plotly.py will benefit from this new functionality?

@jonmmease
Copy link
Contributor

Hi @VelizarVESSELINOV, plotly.py will get it automatically (our code generation process automatically picks up new properties like this). Looks like this will make it into plotly.py 3.4.0.

@jonmmease jonmmease added this to the v3.4.0 milestone Oct 24, 2018
@turqoisehat
Copy link

Any idea when this will start working in R?

@WenyinWei
Copy link

Hello guys, to be honest, I also met the problem that the "reversed" setup doesn't work. But my plotly.py is 4.5.2 and it still doesn't work. Would you mind having a check whether the functionality is added and really works?

@tpeet
Copy link

tpeet commented Jul 1, 2020

@WenyinWei , did you modify layout.zaxis.autorange or layout.scene.zaxis.autorange? Latter should be used for 3D plots. You could try this:

fig.update_scenes(zaxis_autorange="reversed")

https://stackoverflow.com/questions/58532088/how-to-switch-direction-of-axis-in-3d-scatterplot-plotly/62672879#62672879

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants