# Examples from pyvista.Plotter.add_scalar_bar
# ============================================

# Add a custom interactive scalar bar that is horizontal, has an
# outline, and has a custom formatting.
import pyvista as pv
sphere = pv.Sphere()
sphere['Data'] = sphere.points[:, 2]
pl = pv.Plotter()
_ = pl.add_mesh(sphere, show_scalar_bar=False)
_ = pl.add_scalar_bar(
    'Data',
    interactive=True,
    vertical=False,
    title_font_size=35,
    label_font_size=30,
    outline=True,
    fmt='%10.5f',
)
pl.show()

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

