pyvista.PointSet.explode#

PointSet.explode(factor=0.1)[source]#

Push each individual cell away from the center of the dataset.

Parameters:
factorfloat, default: 0.1

How much each cell will move from the center of the dataset relative to its distance from it. Increase this number to push the cells farther away.

Returns:
pyvista.UnstructuredGrid

UnstructuredGrid containing the exploded cells.

Notes

This is similar to shrink except that it does not change the size of the cells.

Examples

>>> import numpy as np
>>> import pyvista as pv
>>> xrng = np.linspace(0, 1, 3)
>>> yrng = np.linspace(0, 2, 4)
>>> zrng = np.linspace(0, 3, 5)
>>> grid = pv.RectilinearGrid(xrng, yrng, zrng)
>>> exploded = grid.explode()
>>> exploded.plot(show_edges=True)
https://d33wubrfki0l68.cloudfront.net/27ab1ea7e9ad71b11207f59dbd5e3d0a7727c8b5/3330a/_images/pyvista-pointset-explode-1_00_00.png