pyvista.themes._Font#

class _Font[source]#

PyVista plotter font configuration.

Examples

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

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

Set the default font size to 20.

>>> pyvista.global_theme.font.size = 20  

Set the default title size to 40

>>> pyvista.global_theme.font.title_size = 40  

Set the default label size to 10

>>> pyvista.global_theme.font.label_size = 10  

Set the default text color to ‘grey’

>>> pyvista.global_theme.font.color = 'grey'  

Set the string formatter used to format numerical data to ‘%.6e’

>>> pyvista.global_theme.font.fmt = '%.6e'  

Methods

_Font.from_dict(dict_)

Create from a dictionary.

_Font.to_dict()

Return theme config parameters as a dictionary.

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.