# Examples from pyvista.Camera.tight
# ==================================

# Display the bird image with a tight view.
import pyvista as pv
from pyvista import examples
bird = examples.download_bird()
pl = pv.Plotter(border=True, border_width=5)
_ = pl.add_mesh(bird, rgb=True)
pl.camera.tight()
pl.show()

# Set the background to blue use a 5% padding around the image.
pl = pv.Plotter()
_ = pl.add_mesh(bird, rgb=True)
pl.background_color = 'b'
pl.camera.tight(padding=0.05)
pl.show()

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

