jpt.plotting.engines.matplotlib_engine ====================================== .. py:module:: jpt.plotting.engines.matplotlib_engine Attributes ---------- .. autoapisummary:: jpt.plotting.engines.matplotlib_engine.matplotlib_version jpt.plotting.engines.matplotlib_engine.plotstyle Classes ------- .. autoapisummary:: jpt.plotting.engines.matplotlib_engine.MatplotlibRendering Functions --------- .. autoapisummary:: jpt.plotting.engines.matplotlib_engine.save_plot Module Contents --------------- .. py:data:: matplotlib_version .. py:data:: plotstyle :value: 'seaborn-v0_8-deep' .. py:function:: save_plot(fig, directory, fname, fmt=None) .. py:class:: MatplotlibRendering Bases: :py:obj:`jpt.plotting.engines.rendering.DistributionRendering` Abstract supertype of distribution rendering engines. Instantiating this class with the `engine` parameter will overriding this class's __new__ method and automatically create an instance of the respective subclass. .. py:method:: plot_multinomial(dist: Any, title: str = None, fname: str = None, directory: str = '/tmp', pdf: bool = False, view: bool = False, horizontal: bool = False, max_values: bool = None, alphabet: bool = False, **kwargs) Generates a ``horizontal`` (if set) otherwise `vertical` bar plot representing the variable's distribution. :param title: the name of the variable this distribution represents :param fname: the name of the file to be stored :param directory: the directory to store the generated plot files :param pdf: whether to store files as PDF. If false, a png is generated by default :param view: whether to display generated plots, default False (only stores files) :param horizontal: whether to plot the bars horizontally, default is False, i.e. vertical bars :param max_values: maximum number of values to plot :param alphabet: whether the bars are sorted in alphabetical order of the variable names. If False, the bars are sorted by probability (descending); default is False :return: None .. py:method:: plot_numeric(dist: Any, title: Union[str, bool] = None, fname: str = None, xlabel: str = 'value', directory: str = '/tmp', view: bool = False, pdf: bool = False, **kwargs) Generates a plot of the piecewise linear function representing the variable's cumulative distribution function :param title: the name of the variable this distribution represents :param fname: the name of the file to be stored :param xlabel: the label of the x-axis :param directory: the directory to store the generated plot files :param pdf: whether to store files as PDF. If false, a png is generated by default :param view: whether to display generated plots, default False (only stores files) :return: None .. py:method:: plot_integer(dist: Any, title: str = None, fname: str = None, directory: str = '/tmp', pdf: bool = False, view: bool = False, horizontal: bool = False, max_values: int = None, alphabet: bool = False, **kwargs) Generates a ``horizontal`` (if set) otherwise `vertical` bar plot representing the variable's distribution. :param title: the name of the variable this distribution represents :param fname: the name of the file to be stored :param directory: the directory to store the generated plot files :param pdf: whether to store files as PDF. If false, a png is generated by default :param view: whether to display generated plots, default False (only stores files) :param horizontal: whether to plot the bars horizontally, default is False, i.e. vertical bars :param max_values: maximum number of values to plot :param alphabet: whether the bars are sorted in alphabetical order of the variable names. If False, the bars are sorted by probability (descending); default is False :return: None .. py:method:: plot_multivariate(dist: Any, title: str = None, fname: str = None, directory: str = '/tmp', pdf: bool = False, view: bool = False, **kwargs) .. py:method:: plot_gaussian(dist: Any, title: Union[str, bool] = None, fname: str = None, xlabel: str = '$x$', ylabel: str = '$p(x|\\mu,\\sigma)$', dim: int = 3, directory: str = '/tmp', view: bool = False, pdf: bool = False, **kwargs) Generates a plot of the piecewise linear function representing the variable's cumulative distribution function :param title: the name of the variable this distribution represents :param fname: the name of the file to be stored :param xlabel: the label of the x-axis :param directory: the directory to store the generated plot files :param pdf: whether to store files as PDF. If false, a png is generated by default :param view: whether to display generated plots, default False (only stores files) :return: None