我已经审查了的这些线程,但我仍然在努力使从一个三维表面图numpy的排列x, y, z坐标。
我的数组如下所示:
>>> points
array([[ 322697.1875 , 3663966.5 , -30000. ],
[ 325054.34375 , 3663966.5 , -30000. ],
[ 325054.34375 , 3665679.5 , -30000. ],
[ 322697.1875 , 3665679.5 , -30000. ],
[ 322697.1875 , 3663966.5 , -27703.12304688],
[ 325054.34375 , 3663966.5 , -27703.15429688],
[ 325054.34375 , 3665679.5 , -27703.70703125],
[ 322697.1875 , 3665679.5 , -27703.67382812]])
Run Code Online (Sandbox Code Playgroud)
ax.plot_surface接受x, y, z点,所以我将上面的数组转换为下面的单独部分:
x = points[:, 0]
y = points[:, 1] …Run Code Online (Sandbox Code Playgroud) I have a VTK file (unstructured grid) with points and cells.
I can import the file and read it into using the meshio python package.
If I type the command mesh.cells I see a dictionary called 'hexahedron' with an array made up of lists inside like this:
{'hexahedron': array([[ 0, 162, 185, ..., 163, 186, 23],
[162, 329, 351, ..., 330, 352, 186],
[329, 491, 514, ..., 492, 515, 352],
...,
[483, 583, 600, ..., 584, 601, 490],
[583, …Run Code Online (Sandbox Code Playgroud) 我正在尝试将上下文底图绘制到我的 cartopy GeoAxes 之一上,但问题是底部的源页脚很大。有什么办法可以减小它的尺寸吗?谢谢!
这就是我简单地将其添加到我的轴中的方法:
import contextily as ctx
ax2=fig.add_subplot(gs01[:,0], projection=ccrs.PlateCarree())
ctx.add_basemap(ax2)
Run Code Online (Sandbox Code Playgroud)
python ×2
python-3.x ×2
cartopy ×1
contextily ×1
geopandas ×1
matplotlib ×1
mesh ×1
numpy ×1
paraview ×1
vtk ×1