Renderer.add_floor(face='-z', i_resolution=10, j_resolution=10, color=None, line_width=None, opacity=1.0, show_edges=False, lighting=False, edge_color=None, reset_camera=None, pad=0.0, offset=0.0, pickable=False, store_floor_kwargs=True)

Show a floor mesh.

This generates planes at the boundaries of the scene to behave like floors or walls.

facestr, optional

The face at which to place the plane. Options are ('-z', '-y', '-x', '+z', '+y', and '+z'). Where the -/+ sign indicates on which side of the axis the plane will lie. For example, '-z' would generate a floor on the XY-plane and the bottom of the scene (minimum z).

i_resolutionint, optional

Number of points on the plane in the i direction.

j_resolutionint, optional

Number of points on the plane in the j direction.

colorstr or 3 item list, optional

Color of all labels and axis titles. Default gray. Either a string, rgb list, or hex color string.

line_widthint, optional

Thickness of the edges. Only if show_edges is True.

opacityfloat, optional

The opacity of the generated surface.

show_edgesbool, optional

Flag on whether to show the mesh edges for tiling.

line_widthfloat, optional

Thickness of lines. Only valid for wireframe and surface representations. Default None.

lightingbool, optional

Enable or disable view direction lighting. Default False.

edge_colorstr or sequence, optional

Color of of the edges of the mesh.

reset_camerabool, optional

Resets the camera when True after adding the floor.

padfloat, optional

Percentage padding between 0 and 1.

offsetfloat, optional

Percentage offset along plane normal.

pickablebool, optional

Make this floor actor pickable in the renderer.

store_floor_kwargsbool, optional

Stores the keyword arguments used when adding this floor. Useful when updating the bounds and regenerating the floor.


VTK actor of the floor.


Add a floor below a sphere and plot it.

>>> import pyvista
>>> pl = pyvista.Plotter()
>>> actor = pl.add_mesh(pyvista.Sphere())
>>> actor = pl.add_floor()