Skip to content

Scatter3D plot is rounding values #4053

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
boleslawmaliszewski opened this issue Jul 16, 2019 · 4 comments
Closed

Scatter3D plot is rounding values #4053

boleslawmaliszewski opened this issue Jul 16, 2019 · 4 comments
Labels
bug something broken

Comments

@boleslawmaliszewski
Copy link

Hi,
I am trying to render some data from lidar on a Scatter3D graph and I encounter a strange problem. It looks like the data is somehow rounded...

Here is the code with the original, unchanged data:
https://codepen.io/bmaliszewski/pen/EBqaZJ
And here is the code where I subtract some constance value from X and Y:
X = X - 7541560
Y = Y - 5751100
The plot relatively should be looking the same, but its not:
https://codepen.io/bmaliszewski/pen/rEXOxw

@etpinard
Copy link
Contributor

Thanks very much for the report!

Hmm @archmoj any ideas on why this is happening? It might be related to #2646

@archmoj
Copy link
Contributor

archmoj commented Jul 17, 2019

Webgl 1 uses float numbers to draw numbers to the screen. And float numbers work best when the distribution of points are around the origin.
On the other hand Lidar data namely those that are encoded in LAZ format are using integer numbers which could help in lossless compression.
@boleslawmaliszewski offsetting the numbers (as a pre-processing step) as you did is a good idea until we may possibly address this issue.

@etpinard etpinard added the bug something broken label Jul 17, 2019
@archmoj
Copy link
Contributor

archmoj commented Jul 18, 2019

This codepen illustrates scattergl handles the raw data properly.
For this regl-scatter2d uses to-float32 module.

@gvwilson
Copy link
Contributor

Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our backlog. Thanks for your help - @gvwilson

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