pyFM.vizΒΆ

PyVista-based visualization helpers.

This subpackage is optional: it is only importable with the viz extra installed:

pip install 'pyfmaps[viz]'

Nothing here imports PyVista at module level, so import pyFM never requires it.

The plot functions are rather flexible and work with any Object that contains .vertices and .faces attributes. A pointcloud object must have a .vertices, and either no faces attributes, an empty list or None.

IN the functions, scalars is the data to color the mesh with (scalar or RGB), cmap is the name of a matplotlib colormap used to transfer scalars to RGB.

Functions

plot_mesh(mesh[, scalars, cmap, clim, ...])

Plot a mesh or point cloud, optionally with extra points and a vector field.

plot_arrows(points, vfield, *[, color, ...])

Plot a vector field as arrows.

to_polydata([mesh, vertices, faces, scalars])

Convert a mesh to a pyvista.PolyData.

vertices_to_rgb(vertices[, param])

Transforms (x,y,z) coordinates into RGB values using some better transformation than XYZ->RGB.