Skip to content
Advertisement

How to draw a 3D grid using matplotlib based on three columns of data?

I’m facing a problem with making a 3D plot. I want to build a 3D surface plot like below from three columns of data. Expected graphic case

I have implemented a few currently, as shown below. Current picture case But I still don’t know how to make it “grid” like the first picture? Does anyone know how to achieve this? Part of the code and full data are as follows.

JavaScript

Download all data Sincerely appreciate your help

Advertisement

Answer

Remove the colormap and opacity in the trisurf command like so:

JavaScript

That should result in:

Trisurf wireframe

You could also take a look at plot_wireframe(). For that I think you have to start with

JavaScript

But I’m not sure how to create the z coordinate. It seems you may need interpolation from what I read.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement