Reference

API

ArviZPlots.distplot!Method
distplot(x; kwargs...)
distplot!(x; kwargs...)

Plot distribution as histogram, KDE, or ECDF.

By default continuous variables are plotted using KDEs and discrete ones using histograms

Positional Arguments

  • x: values to plot

Keyword Arguments

  • kind=:auto: By default (:auto), continuous variables are plotted using KDEs and discrete ones using histograms. The following values can override this behavior:
    • kind=:kde: Plot using a kernel density estimate (see kdeplot)
    • kind=:hist: Plot using a histogram (see [Plots.histogram]
    • kind=:ecdf: Plot using an empirical cumulative distribution function (see ecdfplot)
  • circular=false: Select input type in (:radians, :degrees) for circular histogram or KDE plot. If true, default input type is :radians. Pass projection=:polar to also plot on a polar axis; however, this will not plot correctly when circular=:degrees.
  • kwargs: Additional attributes understood by Plots.jl. In particular, see keyword arguments for kdeplot and histogram.
source
ArviZPlots.distplotMethod
distplot(x; kwargs...)
distplot!(x; kwargs...)

Plot distribution as histogram, KDE, or ECDF.

By default continuous variables are plotted using KDEs and discrete ones using histograms

Positional Arguments

  • x: values to plot

Keyword Arguments

  • kind=:auto: By default (:auto), continuous variables are plotted using KDEs and discrete ones using histograms. The following values can override this behavior:
    • kind=:kde: Plot using a kernel density estimate (see kdeplot)
    • kind=:hist: Plot using a histogram (see [Plots.histogram]
    • kind=:ecdf: Plot using an empirical cumulative distribution function (see ecdfplot)
  • circular=false: Select input type in (:radians, :degrees) for circular histogram or KDE plot. If true, default input type is :radians. Pass projection=:polar to also plot on a polar axis; however, this will not plot correctly when circular=:degrees.
  • kwargs: Additional attributes understood by Plots.jl. In particular, see keyword arguments for kdeplot and histogram.
source
ArviZPlots.energyplot!Method
energyplot(data; kwargs...)
energyplot!(data; kwargs...)

Plot energy transition distribution and marginal energy distribution in HMC algorithms.

This may help to diagnose poor exploration by gradient-based algorithms like HMC or NUTS.

Positional Arguments

  • data: any object that can be converted to an ArviZ.Dataset representing a sample_stats group with an energy variable.

Keyword Arguments

  • showbfmi=true: If true add to the plot the value of the estimated Bayesian fraction of missing information.
  • kwargs: Additional attributes understood by Plots.jl. In particular, see keyword arguments for distplot.
source
ArviZPlots.energyplot!Method
energyplot(data; kwargs...)
energyplot!(data; kwargs...)

Plot energy transition distribution and marginal energy distribution in HMC algorithms.

This may help to diagnose poor exploration by gradient-based algorithms like HMC or NUTS.

Positional Arguments

  • data: any object that can be converted to an ArviZ.Dataset representing a sample_stats group with an energy variable.

Keyword Arguments

  • showbfmi=true: If true add to the plot the value of the estimated Bayesian fraction of missing information.
  • kwargs: Additional attributes understood by Plots.jl. In particular, see keyword arguments for distplot.
source
ArviZPlots.energyplotMethod
energyplot(data; kwargs...)
energyplot!(data; kwargs...)

Plot energy transition distribution and marginal energy distribution in HMC algorithms.

This may help to diagnose poor exploration by gradient-based algorithms like HMC or NUTS.

Positional Arguments

  • data: any object that can be converted to an ArviZ.Dataset representing a sample_stats group with an energy variable.

Keyword Arguments

  • showbfmi=true: If true add to the plot the value of the estimated Bayesian fraction of missing information.
  • kwargs: Additional attributes understood by Plots.jl. In particular, see keyword arguments for distplot.
source
ArviZPlots.kde2dplot!Method
kde2dplot(x, y; kwargs...)
kde2dplot!(x, y; kwargs...)

Plot a 2D kernel density estimate (KDE) taking into account boundary conditions.

Positional Arguments

  • x: x coordinates of the values
  • y: y coordinates of the values

Keyword Arguments

  • contour=true: If true, plot the 2D KDE using contours, otherwise plot a heatmap.
  • kwargs: Additional attributes understood by Plots.jl.
source
ArviZPlots.kde2dplotMethod
kde2dplot(x, y; kwargs...)
kde2dplot!(x, y; kwargs...)

Plot a 2D kernel density estimate (KDE) taking into account boundary conditions.

Positional Arguments

  • x: x coordinates of the values
  • y: y coordinates of the values

Keyword Arguments

  • contour=true: If true, plot the 2D KDE using contours, otherwise plot a heatmap.
  • kwargs: Additional attributes understood by Plots.jl.
source
ArviZPlots.kdeplot!Method
kdeplot(x[, y]; kwargs...)
kdeplot!(x[, y]; kwargs...)

Plot a 1D or 2D kernel density estimate (KDE) taking into account boundary conditions.

Positional Arguments

  • x: Values to plot.
  • y: Values to plot. If present, a 2D KDE will be estimated. See kde2dplot.

Keyword Arguments

  • bw=:default: If numeric, indicates the bandwidth and must be positive. If Symbol, indicates the method to estimate the bandwidth and must be one of :scott, :silverman, :isj or :experimental when circular=false and :taylor (for now) when circular=true. :default means :experimental when variable is not circular and :taylor when it is.
  • circular=false: Select input type in (:radians, :degrees) for circular KDE plot. If true, default input type is :radians. Pass projection=:polar to also plot on a polar axis; however, this will not plot correctly when circular=:degrees.
  • cumulative=false: If true, plot the estimated cumulative distribution function
  • showrug=false: If true, adds a rugplot
  • rugspace=0.05: control the y position of the rugplot. The larger this number the lower the rugplot
  • kwargs: Additional attributes understood by Plots.jl. In particular, see keyword arguments for kde2dplot and rugplot.
source
ArviZPlots.kdeplotMethod
kdeplot(x[, y]; kwargs...)
kdeplot!(x[, y]; kwargs...)

Plot a 1D or 2D kernel density estimate (KDE) taking into account boundary conditions.

Positional Arguments

  • x: Values to plot.
  • y: Values to plot. If present, a 2D KDE will be estimated. See kde2dplot.

Keyword Arguments

  • bw=:default: If numeric, indicates the bandwidth and must be positive. If Symbol, indicates the method to estimate the bandwidth and must be one of :scott, :silverman, :isj or :experimental when circular=false and :taylor (for now) when circular=true. :default means :experimental when variable is not circular and :taylor when it is.
  • circular=false: Select input type in (:radians, :degrees) for circular KDE plot. If true, default input type is :radians. Pass projection=:polar to also plot on a polar axis; however, this will not plot correctly when circular=:degrees.
  • cumulative=false: If true, plot the estimated cumulative distribution function
  • showrug=false: If true, adds a rugplot
  • rugspace=0.05: control the y position of the rugplot. The larger this number the lower the rugplot
  • kwargs: Additional attributes understood by Plots.jl. In particular, see keyword arguments for kde2dplot and rugplot.
source
ArviZPlots.pairplot!Method
pairplot(data)
pairplot!(data)

Plot a scatter, kde and/or hexbin matrix with (optional) marginals on the diagonal.

Positional Arguments

  • data: Any object that can be converted to an ArviZ.InferenceData object. See ArviZ.convert_to_inference_data for details.

Keyword Arguments

  • group=:posterior: Specifies which InferenceData group should be plotted.
  • var_names=nothing: Variables to be plotted. Prefix the variables by ~ to exclude them from the plot. Behavior modified by filter_vars.
  • filter_vars=nothing: interpret var_names as
    • filter_vars=nothing: real variables names
    • filter_vars="like": substrings of the real variables names
    • filter_vars="regex": regular expressions on the real variables names
  • coords=Dict(): Specific coordinates of var_names to be plotted
  • showmarginals=false: If true, pairplot will include marginal distributions for every variable
  • kind=:scatter: Type of plot to display or list of types. Supported types are:
    • scatter
    • kde/kdeplot/kde2dplot
    • hist/histogram2d
    • hexbin (Note that most backends do not support this series type)
  • showdivergences=false: If true, divergences will be plotted in a different color, only if group is either :prior or :posterior.
  • divergencescolor: Color of divergences markers.
  • point_estimate=nothing: Select point estimate from :mean, :mode or :median. The point estimate will be plotted using a scatter marker and vertical/horizontal lines.
  • kwargs: Additional attributes understood by Plots.jl. In particular, see keyword arguments for distplot, kdeplot, and kde2dplot.
source
ArviZPlots.pairplot!Method
pairplot(data)
pairplot!(data)

Plot a scatter, kde and/or hexbin matrix with (optional) marginals on the diagonal.

Positional Arguments

  • data: Any object that can be converted to an ArviZ.InferenceData object. See ArviZ.convert_to_inference_data for details.

Keyword Arguments

  • group=:posterior: Specifies which InferenceData group should be plotted.
  • var_names=nothing: Variables to be plotted. Prefix the variables by ~ to exclude them from the plot. Behavior modified by filter_vars.
  • filter_vars=nothing: interpret var_names as
    • filter_vars=nothing: real variables names
    • filter_vars="like": substrings of the real variables names
    • filter_vars="regex": regular expressions on the real variables names
  • coords=Dict(): Specific coordinates of var_names to be plotted
  • showmarginals=false: If true, pairplot will include marginal distributions for every variable
  • kind=:scatter: Type of plot to display or list of types. Supported types are:
    • scatter
    • kde/kdeplot/kde2dplot
    • hist/histogram2d
    • hexbin (Note that most backends do not support this series type)
  • showdivergences=false: If true, divergences will be plotted in a different color, only if group is either :prior or :posterior.
  • divergencescolor: Color of divergences markers.
  • point_estimate=nothing: Select point estimate from :mean, :mode or :median. The point estimate will be plotted using a scatter marker and vertical/horizontal lines.
  • kwargs: Additional attributes understood by Plots.jl. In particular, see keyword arguments for distplot, kdeplot, and kde2dplot.
source
ArviZPlots.pairplotMethod
pairplot(data)
pairplot!(data)

Plot a scatter, kde and/or hexbin matrix with (optional) marginals on the diagonal.

Positional Arguments

  • data: Any object that can be converted to an ArviZ.InferenceData object. See ArviZ.convert_to_inference_data for details.

Keyword Arguments

  • group=:posterior: Specifies which InferenceData group should be plotted.
  • var_names=nothing: Variables to be plotted. Prefix the variables by ~ to exclude them from the plot. Behavior modified by filter_vars.
  • filter_vars=nothing: interpret var_names as
    • filter_vars=nothing: real variables names
    • filter_vars="like": substrings of the real variables names
    • filter_vars="regex": regular expressions on the real variables names
  • coords=Dict(): Specific coordinates of var_names to be plotted
  • showmarginals=false: If true, pairplot will include marginal distributions for every variable
  • kind=:scatter: Type of plot to display or list of types. Supported types are:
    • scatter
    • kde/kdeplot/kde2dplot
    • hist/histogram2d
    • hexbin (Note that most backends do not support this series type)
  • showdivergences=false: If true, divergences will be plotted in a different color, only if group is either :prior or :posterior.
  • divergencescolor: Color of divergences markers.
  • point_estimate=nothing: Select point estimate from :mean, :mode or :median. The point estimate will be plotted using a scatter marker and vertical/horizontal lines.
  • kwargs: Additional attributes understood by Plots.jl. In particular, see keyword arguments for distplot, kdeplot, and kde2dplot.
source

Miscellaneous

ArviZPlots.ecdfplotMethod
ecdfplot(x; kwargs...)
ecdfplot!(x; kwargs...)

Plot the empirical cumulative distribution function (ECDF) of the data x.

Positional Arguments

  • x: Values to plot

Keyword Arguments

  • weights=nothing: Vector of weights to be used for a weighted ECDF
  • kwargs: Additional attributes understood by Plots.jl
source
ArviZPlots.rugplotMethod
rugplot(x; kwargs...)
rugplot!(x; kwargs...)

Make a rugplot.

Positional Arguments

  • x: values

Keyword Arguments

  • rugmarkershape=:auto: shape of marker, defaulting to perpendicular to the data axis
  • rugsize=8: size (height) of marker
  • rugcolor=:auto: color of marker
  • rugalpha=:auto: alpha value (transparency) of marker
  • rugposition=0: position of rug on non-data axis
  • kwargs: Additional attributes understood by Plots.jl
source
RecipesBase.plotMethod
plot(data::ArviZ.Dataset; kwargs...)
plot!(data::ArviZ.Dataset; kwargs...)

Plot the specified group of data using kwargs attributes recognized by Plots.

data is split into individual subplots based on the provided keyword arguments. Chain number for each draw is stored in the plot attribute chain and can be used by series recipes.

Positional Arguments

  • data: an ArviZ.Dataset object.

Keyword Arguments

  • var_names=nothing: Variables to be plotted. Prefix the variables by ~ to exclude them from the plot. Behavior modified by filter_vars.
  • filter_vars=nothing: interpret var_names as
    • filter_vars=nothing: real variables names
    • filter_vars="like": substrings of the real variables names
    • filter_vars="regex": regular expressions on the real variables names
  • coords=Dict(): Specific coordinates of var_names to be plotted
  • kwargs: Additional attributes understood by Plots.jl
source
RecipesBase.plotMethod
plot(data::InferenceData; groupname=:posterior, kwargs...)
plot!(data::InferenceData; groupname=:posterior, kwargs...)

Plot the specified group of data using kwargs attributes recognized by Plots.

source