StatsPlots.jl
StatsPlots.jl copied to clipboard
More Options for cornerplot
This is a feature request.
Request
cornerplot should have more user-facing control for the final output.
Description:
A common use for corner plots are the analysis of MCMC chains (e.g. MCMCChains.jl exports a corner plot method). I have found myself on multiple occasions constructing my own corner plots because there is not enough granularity in the current cornerplot function. Most of these options are inspired from the corner library.
I propose the following options be added as keyword arguments to the current cornerplot recipe:
fit_line::Bool=falseto determine whether to plot the correlation line on each scatter plothistograms::Bool=truedetermines whether to plot the histograms at all. This ought to be equivalent tohist_pct=0.0but in the current state that breaks the plot.hist_kde::Bool=false, if true, will usedensityto plot the histograms rather thanhistogram(N.B. an alternative would behist_type=densityorhist_type=histogram)scatter::Bool=true, if true, will plot the scatter like normal.contours::Union{Bool, AbstractVector{<:AbstractFloat}=false, if true, will add contours, if a vector of numbers, use these as the contour levels.quantiles::AbstractVector{<:AbstractFloat}, if provided, will add vertical dashed lines in each histogram plot at the given quantiles
I would love to hear feedback on these keyword arg names and defaults here.
Triage
I am willing to work on this but may require some input from someone more familiar to the cornerplot recipe. If that person would serve as a reviewer/contact for the eventual PR I can put in the work myself.
I just asked about this on Zulip and was directed to a very nice implementation here!
Recipes here: https://github.com/JuliaEarth/GeoStatsBase.jl/blob/a1a67e498477f80890556443232c3e08a415e083/src/plotrecipes/cornerplot.jl https://github.com/JuliaEarth/GeoStatsBase.jl/blob/a1a67e498477f80890556443232c3e08a415e083/src/plotrecipes/distplot1D.jl https://github.com/JuliaEarth/GeoStatsBase.jl/blob/a1a67e498477f80890556443232c3e08a415e083/src/plotrecipes/distplot2D.jl