jpt.plotting.engines.plotly_engine ================================== .. py:module:: jpt.plotting.engines.plotly_engine Classes ------- .. autoapisummary:: jpt.plotting.engines.plotly_engine.PlotlyRendering Module Contents --------------- .. py:class:: PlotlyRendering 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', view: bool = False, horizontal: bool = False, max_values: int = None, alphabet: bool = False, color: str = 'rgb(15,21,110)', xvar: str = None, **kwargs) Generates a ``horizontal`` (if set) otherwise `vertical` bar plot representing the variable's distribution. :param title: the title of the plot. defaults to the type of this distribution, can be left empty by passing `False`. :param fname: the name of the file to be stored. Available file formats: png, svg, jpeg, webp, html :param directory: the directory to store the generated plot files :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 :param color: the color of the plot traces; accepts str of form: * rgb(r,g,b) with r,g,b being int or float * rgba(r,g,b,a) with r,g,b being int or float, a being float * #f0c (as short form of #ff00cc) or #f0cf (as short form of #ff00ccff) * #ff00cc * #ff00ccff :return: plotly.graph_objs.Figure .. py:method:: plot_numeric(dist: Any, title: Union[str, bool] = None, fname: str = None, xlabel: str = 'value', directory: str = '/tmp', view: bool = False, color: str = 'rgb(15,21,110)', fill: str = None, **kwargs) Generates a plot of the piecewise linear function representing the variable's cumulative distribution function :param title: the title of the plot. defaults to the type of this distribution, can be left empty by passing `False`. :param fname: the name of the file to be stored. Available file formats: png, svg, jpeg, webp, html :param xlabel: the label of the x-axis :param directory: the directory to store the generated plot files :param view: whether to display generated plots, default False (only stores files) :param color: the color of the plot traces; accepts str of form: * rgb(r,g,b) with r,g,b being int or float * rgba(r,g,b,a) with r,g,b being int or float, a being float * #f0c (as short form of #ff00cc) or #f0cf (as short form of #ff00ccff) * #ff00cc * #ff00ccff :return: plotly.graph_objs.Figure .. py:method:: plot_integer(dist: Any, title: str = None, fname: str = None, directory: str = '/tmp', view: bool = False, horizontal: bool = False, max_values: int = None, alphabet: bool = False, color: str = 'rgb(15,21,110)', **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. Available file formats: png, svg, jpeg, webp, html :param directory: the directory to store the generated plot files :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 :param color: the color of the plot traces; accepts str of form: * rgb(r,g,b) with r,g,b being int or float * rgba(r,g,b,a) with r,g,b being int or float, a being float * #f0c (as short form of #ff00cc) or #f0cf (as short form of #ff00ccff) * #ff00cc * #ff00ccff :return: plotly.graph_objs.Figure .. 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 = None, dim: int = 3, precision: int = 2, directory: str = '/tmp', view: bool = False, color: str = 'rgb(15,21,110)', fill: str = None, **kwargs) Generates a plot of the piecewise linear function representing the variable's cumulative distribution function :param title: the title of the plot. defaults to the type of this distribution, can be left empty by passing `False`. :param fname: the name of the file to be stored. Available file formats: png, svg, jpeg, webp, html :param xlabel: the label of the x-axis :param directory: the directory to store the generated plot files :param view: whether to display generated plots, default False (only stores files) :param color: the color of the plot traces; accepts str of form: * rgb(r,g,b) with r,g,b being int or float * rgba(r,g,b,a) with r,g,b being int or float, a being float * #f0c (as short form of #ff00cc) or #f0cf (as short form of #ff00ccff) * #ff00cc * #ff00ccff :return: plotly.graph_objs.Figure