本文介绍了matplotlib 3D数据的2D切片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到任何关于此的信息,可能是因为我没有正确的命名法(即我不知道如何确切地要求它),但无论如何,我有一个 3D numpy 数组一种".我想识别并绘制 a=0 的 2D 表面.要弄清楚,数据是双精度浮点,在3D空间上平滑变化.曲面a = 0很有可能会穿插"在数组的各个点之间,并且不完全位于它们的任何一点上.所以我需要可以插值的东西来找到a = 0曲面并将其绘制出来.matplotlib是否有现成的例程可以执行此操作?

I haven't been able to find anything on this, maybe because I don't have the right nomenclature (i.e. I don't know exactly how to ask for it), but anyway, I have a 3D numpy array "a". I would like to identify and plot the 2D surface where a=0. To make clear, the data is double precision floats smoothly varying over 3D space. It is highly likely that the surface a=0 will "thread between" the points of the array, and not exactly lie right on any of them. So I need something that can interpolate to find the a=0 surface and plot it. Does matplotlib have a ready-made routine for doing this?

推荐答案

借助Plotly,您可以在体积数据中绘制平面和非线性切片: http://nbviewer.jupyter.org/github/empet/Plotly-plots/blob/master/Plotly-Slice-in-volumetric-data.ipynb

With Plotly you can plot both planar and nonlinear slices in volumetric data:http://nbviewer.jupyter.org/github/empet/Plotly-plots/blob/master/Plotly-Slice-in-volumetric-data.ipynb

这篇关于matplotlib 3D数据的2D切片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 23:33