matplotlib.pyplot.set_loglevel#

matplotlib.pyplot.set_loglevel(level)[source]#

Configure Matplotlib's logging levels.

Matplotlib uses the standard librarylogging framework under the rootlogger 'matplotlib'. This is a helper function to:

  • set Matplotlib's root logger level

  • set the root logger handler's level, creating the handlerif it does not exist yet

Typically, one should callset_loglevel("INFO") orset_loglevel("DEBUG") to get additional debugging information.

Users or applications that are installing their own logging handlersmay want to directly manipulatelogging.getLogger('matplotlib') ratherthan use this function.

Parameters:
level{"NOTSET", "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"}

The log level as defined inPython logging levels.

For backwards compatibility, the levels are case-insensitive, butthe capitalized version is preferred in analogy tologging.Logger.setLevel.

Notes

Note

This is equivalent tomatplotlib.set_loglevel.

The first time this function is called, an additional handler is attachedto Matplotlib's root handler; this handler is reused every time and thisfunction simply manipulates the logger and handler's level.

On this page