# Examples from pyvista.Plotter.show
# ==================================

# Simply show the plot of a mesh.
import pyvista as pv
pl = pv.Plotter()
_ = pl.add_mesh(pv.Cube())
pl.show()

# Take a screenshot interactively.  Screenshot will be of the
# first image shown, so use the first call with
# `auto_close=False` to set the scene before taking the
# screenshot.
pl = pv.Plotter()
_ = pl.add_mesh(pv.Cube())
pl.show(auto_close=False)
pl.show(screenshot='my_image.png')

# Obtain the camera position when using `show`.
pl = pv.Plotter()

_ = pl.add_mesh(pv.Sphere())
pl.show(return_cpos=True)

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code

