_Font#

class _Font[source]#

PyVista plotter font configuration.

Examples#

Download Python source code | Download Jupyter notebook

Set the default font family to 'arial'. Must be either 'arial', 'courier', or 'times'.

>>> import pyvista as pv
>>> pv.global_theme.font.family = 'arial'

Set the default font size to 20.

Set the default title size to 40

Set the default label size to 10

Set the default text color to ‘grey’

Set the string formatter used to format numerical data to ‘{:.6e}’

>>> pv.global_theme.font.fmt = '{:.6e}'

Inheritance#

Inherited members are documented on _ConfigBase.

See them all under Inherited Methods.

Attributes#

_Font.color

Return or set the font color.

_Font.family

Return or set the font family.

_Font.fmt

Return or set the string formatter used to format numerical data.

_Font.label_size

Return or set the label size.

_Font.size

Return or set the font size.

_Font.title_size

Return or set the title size.

Inherited Methods#

_ConfigBase.from_dict

Create an instance from a dictionary of attribute values.

_ConfigBase.to_dict

Return config parameters as a dictionary.