Skip to content

deeplabcut.utils.matplotlib_utils

Functions:

Name Description
silence_axes_logger

Raise the log level of Matplotlib's Axes logger.

silence_axes_logger

silence_axes_logger(level: int | str = 'ERROR') -> None

Raise the log level of Matplotlib's Axes logger.

Suppresses the chatty per-artist messages Matplotlib emits while drawing, most notably the invalid-color warnings raised during 3D plotting.

Parameters:

Name Type Description Default

level

int | str

Any level accepted by logging.Logger.setLevel.

'ERROR'
Source code in deeplabcut/utils/matplotlib_utils.py
def silence_axes_logger(level: int | str = "ERROR") -> None:
    """Raise the log level of Matplotlib's ``Axes`` logger.

    Suppresses the chatty per-artist messages Matplotlib emits while drawing,
    most notably the invalid-color warnings raised during 3D plotting.

    Args:
        level: Any level accepted by ``logging.Logger.setLevel``.
    """
    logging.getLogger(AXES_LOGGER_NAME).setLevel(level)