How can an almost arbitrary plane in a 3D dataset be plotted by matplotlib?

前端 未结 5 1544
慢半拍i
慢半拍i 2021-01-18 15:11

There is an array containing 3D data of shape e.g. (64,64,64), how do you plot a plane given by a point and a normal (similar to hkl planes in crystallography), through this

5条回答
  •  鱼传尺愫
    2021-01-18 15:46

    This is funny, a similar question I replied to just today. The way to go is: interpolation. You can use griddata from scipy.interpolate:

    Griddata

    This page features a very nice example, and the signature of the function is really close to your data.

    You still have to somehow define the points on you plane for which you want to interpolate the data. I will have a look at this, my linear algebra lessons where a couple of years ago

提交回复
热议问题