# Examples from pyvista.opacity_transfer_function
# ===============================================

import pyvista as pv
# Fetch the `sigmoid` mapping between 0 and 255
tf = pv.opacity_transfer_function('sigmoid', 256)
# Fetch the `geom_r` mapping between 0 and 1
tf = pv.opacity_transfer_function('geom_r', 256).astype(float) / 255.0
# Interpolate a user defined opacity mapping
opacity = [0, 0.2, 0.9, 0.6, 0.3]
tf = pv.opacity_transfer_function(opacity, 256)

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

