JuliaPlots / StatsPlots.jl

Statistical plotting recipes for Plots.jl
Other
437 stars 88 forks source link

Feature request MvNormal for covellipse #489

Open ga72kud opened 2 years ago

ga72kud commented 2 years ago

It would be nice if the second line would also work

N=MvNormal(μ, Σ)

covellipse(N, n_std=2, aspect_ratio=1, label="cov1")

covellipse(μ, Σ, n_std=2, aspect_ratio=1, label="cov1")
sethaxen commented 2 years ago

I agree, this would be nice.

In general I think this code can be improved. e.g. We can support trivariate normals by plotting an ellipsoid. We can also support n-variate normals by allowing the user to specify which slice of the covariance matrix should be plotted. A corellipse function would be useful as well. And we could even go so far as to support something like corrplot that plots ellipses for all bivariate slices of the covariance matrix.

Then, for Bayesian modeling, it's useful to view distributions of covariance/correlation matrices. This paper introduces some plots for this: http://www.stat.columbia.edu/~gelman/research/unpublished/Visualization.pdf

ga72kud commented 2 years ago

Thank you! That sounds great!

sethaxen commented 2 years ago

@ga72kud I'm re-opening so we can track this feature.