Source code for pyensae.graphhelper.matplotlib_helper

# -*- coding: utf-8 -*-
Various functions about :epkg:`matplotlib`.

import sys

[docs]def mpl_switch_style(style="ggplot"): """ Changes the graph style. :param style: see `Customizing plots with style sheets <>`_ :githublink:`%|py|15` """ # This import was moved here because ths code is executed when # the module is imported and for some reasons, it overides some of the settings # sphinx is doing and graphs are not part of the documentation but show up # in a separate window. if "plt" not in sys.modules: import matplotlib.pyplot as plt # pylint: disable=C0415