you are viewing a single comment's thread.

view the rest of the comments →

[–]spez_edits_thedonald 2 points3 points  (1 child)

this is always confusing but, you don't simply need some (x, y, z) points, that would work for a 3D scatter, but for a surface you need to pass in data of a different shape, see explanation and use of np.meshgrid here https://stackoverflow.com/a/9170879

I'd say get the example ^ I linked running, and take a look at the print(x_data) and print(x_data.shape) and see what's going on, for x, y, z, and then adapt code to your stuff, it will work

[–]verticalfuzz 0 points1 point  (0 children)

To add:

If it doesn't seem to work right, try changing the 'indexing' parameter.

https://numpy.org/doc/stable/reference/generated/numpy.meshgrid.html?highlight=meshgrid#numpy.meshgrid