Skip to content

Surface plots do not quite follow the data #2713

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
alexcjohnson opened this issue Jun 8, 2018 · 5 comments · Fixed by #3281
Closed

Surface plots do not quite follow the data #2713

alexcjohnson opened this issue Jun 8, 2018 · 5 comments · Fixed by #3281
Assignees
Labels
bug something broken

Comments

@alexcjohnson
Copy link
Collaborator

See https://codepen.io/alexcjohnson/pen/gKLBgR?editors=0010
screen shot 2018-06-08 at 5 00 44 pm

I was trying to get the contour lines to exactly match the data, but notice that the line at y=1.3 (last black line in the red) is not quite straight (even though the data at y=1.3 is uniformly 1.0) and the line at y=1.4 (first black line in the green) does not quite reach the correct value of 0.898 like its neighbors at larger y do. Digging in a bit deeper, it seems like the contours are following the surface very closely - perhaps not precisely, there are still a few spots where they seem to disappear behind the surface, but it's pretty close. But the surface itself seems to disagree a little bit with the data, which you can see by zooming in near one of these corners:
screen shot 2018-06-08 at 2 47 27 pm
It looks like either a) the surface is smoothing a little bit around these sharp corners, or b) the surface is actually creating a finer mesh than the data points, and this mesh is not aligned with the data so it misses the corners. Either way it's not doing the right thing.

cc @etpinard as mentioned in #2712

@alexcjohnson alexcjohnson added the bug something broken label Jun 8, 2018
@archmoj archmoj self-assigned this Nov 11, 2018
@archmoj
Copy link
Contributor

archmoj commented Nov 19, 2018

Here is another demo to illustrate this issue.

@archmoj
Copy link
Contributor

archmoj commented Nov 22, 2018

One of the best illustrations for this bug is gl3d_surface-lighting mock where those high points on the diagonal have z values equal to 1!

@archmoj
Copy link
Contributor

archmoj commented Nov 22, 2018

Here is a simpler demo for debugging this issue.

@archmoj
Copy link
Contributor

archmoj commented Nov 22, 2018

When this is fixed gl3d_surface-lighting should look something like this:
newplot

@alexcjohnson
Copy link
Collaborator Author

An extreme example of the problem - spiky data like gl3d_surface-lighting (the data is only 0s and 1s) but very nonuniform x/y data - https://codepen.io/alexcjohnson/pen/XyBReJ?editors=1000
screen shot 2018-11-26 at 4 02 10 pm
notice that the thinner spikes rarely reach 1.

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
2 participants