How to use the arviz.plots.plot_utils.get_plotting_function function in arviz

To help you get started, we’ve selected a few arviz examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github arviz-devs / arviz / arviz / plots / jointplot.py View on Github external
joint_kwargs=joint_kwargs,
        gridsize=gridsize,
        marginal_kwargs=marginal_kwargs,
        backend_kwargs=backend_kwargs,
        show=show,
    )

    if backend == "bokeh":

        plot_joint_kwargs.pop("ax_labelsize")
        plot_joint_kwargs["marginal_kwargs"]["plot_kwargs"]["line_width"] = plot_joint_kwargs[
            "marginal_kwargs"
        ]["plot_kwargs"].pop("linewidth")

    # TODO: Add backend kwargs
    plot = get_plotting_function("plot_joint", "jointplot", backend)
    axes = plot(**plot_joint_kwargs)
    return axes
github arviz-devs / arviz / arviz / plots / autocorrplot.py View on Github external
combined=combined,
        linewidth=linewidth,
        xt_labelsize=xt_labelsize,
        titlesize=titlesize,
        backend_kwargs=backend_kwargs,
        show=show,
    )

    if backend == "bokeh":

        autocorr_plot_args.pop("xt_labelsize")
        autocorr_plot_args.pop("titlesize")
        autocorr_plot_args["line_width"] = autocorr_plot_args.pop("linewidth")

    # TODO: Add backend kwargs
    plot = get_plotting_function("plot_autocorr", "autocorrplot", backend)
    axes = plot(**autocorr_plot_args)

    return axes
github arviz-devs / arviz / arviz / plots / densityplot.py View on Github external
shade=shade,
        n_data=n_data,
        data_labels=data_labels,
        backend_kwargs=backend_kwargs,
        show=show,
    )

    if backend == "bokeh":

        plot_density_kwargs["line_width"] = plot_density_kwargs.pop("linewidth")
        plot_density_kwargs.pop("titlesize")
        plot_density_kwargs.pop("xt_labelsize")
        plot_density_kwargs.pop("n_data")

    # TODO: Add backend kwargs
    plot = get_plotting_function("plot_density", "densityplot", backend)
    ax = plot(**plot_density_kwargs)
    return ax
github arviz-devs / arviz / arviz / plots / elpdplot.py View on Github external
xdata=xdata,
        threshold=threshold,
        legend=legend,
        handles=handles,
        color=color,
        backend_kwargs=backend_kwargs,
        show=show,
    )

    if backend == "bokeh":
        elpd_plot_kwargs.pop("legend")
        elpd_plot_kwargs.pop("handles")
        elpd_plot_kwargs.pop("color")

    # TODO: Add backend kwargs
    plot = get_plotting_function("plot_elpd", "elpdplot", backend)
    ax = plot(**elpd_plot_kwargs)
    return ax
github arviz-devs / arviz / arviz / plots / khatplot.py View on Github external
if backend == "bokeh":

        plot_khat_kwargs.pop("hover_label")
        plot_khat_kwargs.pop("hover_format")
        plot_khat_kwargs.pop("kwargs")
        plot_khat_kwargs.pop("ax_labelsize")
        plot_khat_kwargs.pop("xt_labelsize")
        plot_khat_kwargs.pop("hlines_kwargs")
        plot_khat_kwargs.pop("xlabels")
        plot_khat_kwargs.pop("legend")
        plot_khat_kwargs.pop("color_mapping")
        plot_khat_kwargs.pop("cmap")
        plot_khat_kwargs.pop("color")

    # TODO: Add backend kwargs
    plot = get_plotting_function("plot_khat", "khatplot", backend)
    axes = plot(**plot_khat_kwargs)
    return axes
github arviz-devs / arviz / arviz / plots / forestplot.py View on Github external
ncols=ncols,
        credible_interval=credible_interval,
        quartiles=quartiles,
        rope=rope,
        ridgeplot_overlap=ridgeplot_overlap,
        ridgeplot_alpha=ridgeplot_alpha,
        ridgeplot_kind=ridgeplot_kind,
        textsize=textsize,
        ess=ess,
        r_hat=r_hat,
        backend_kwargs=backend_kwargs,
        show=show,
    )

    # TODO: Add backend kwargs
    plot = get_plotting_function("plot_forest", "forestplot", backend)
    axes = plot(**plot_forest_kwargs)
    return axes
github arviz-devs / arviz / arviz / plots / violinplot.py View on Github external
credible_interval=credible_interval,
        linewidth=linewidth,
        ax_labelsize=ax_labelsize,
        xt_labelsize=xt_labelsize,
        quartiles=quartiles,
        backend_kwargs=backend_kwargs,
        show=show,
    )

    if backend == "bokeh":

        violinplot_kwargs.pop("ax_labelsize")
        violinplot_kwargs.pop("xt_labelsize")

    # TODO: Add backend kwargs
    plot = get_plotting_function("plot_violin", "violinplot", backend)
    ax = plot(**violinplot_kwargs)
    return ax
github arviz-devs / arviz / arviz / plots / pairplot.py View on Github external
divergences=divergences,
        diverging_mask=diverging_mask,
        divergences_kwargs=divergences_kwargs,
        flat_var_names=flat_var_names,
        backend_kwargs=backend_kwargs,
        show=show,
    )

    if backend == "bokeh":
        pairplot_kwargs.pop("gridsize", None)
        pairplot_kwargs.pop("colorbar", None)
        pairplot_kwargs.pop("divergences_kwargs", None)
        pairplot_kwargs.pop("hexbin_values", None)

    # TODO: Add backend kwargs
    plot = get_plotting_function("plot_pair", "pairplot", backend)
    ax = plot(**pairplot_kwargs)
    return ax
github arviz-devs / arviz / arviz / plots / traceplot.py View on Github external
rug_kwargs=rug_kwargs,
        hist_kwargs=hist_kwargs,
        trace_kwargs=trace_kwargs,
        # compact = compact,
        combined=combined,
        legend=legend,
        # Generated kwargs
        divergence_data=divergence_data,
        # skip_dims=skip_dims,
        plotters=plotters,
        colors=colors,
        backend_kwargs=backend_kwargs,
        show=show,
    )

    plot = get_plotting_function("plot_trace", "traceplot", backend)
    axes = plot(**trace_plot_args)

    return axes
github arviz-devs / arviz / arviz / plots / posteriorplot.py View on Github external
rope=rope,
        ax_labelsize=ax_labelsize,
        xt_labelsize=xt_labelsize,
        kwargs=kwargs,
        titlesize=titlesize,
        backend_kwargs=backend_kwargs,
        show=show,
    )

    if backend == "bokeh":

        posteriorplot_kwargs.pop("xt_labelsize")
        posteriorplot_kwargs.pop("titlesize")

    # TODO: Add backend kwargs
    plot = get_plotting_function("plot_posterior", "posteriorplot", backend)
    ax = plot(**posteriorplot_kwargs)
    return ax