File Exchange

image thumbnail

Cornerplot

version 1.5.0.0 (11.7 KB) by Will Adler
Make a corner plot of samples in high dimensional spaces

2 Downloads

Updated 28 May 2018

GitHub view license on GitHub

Cornerplot takes a nSamples-by-nDimensions array, and makes density plots of every combination of the dimensions.
This is especially useful when using MCMC; you can see how the parameters in your model interact, and whether there are any tradeoffs between them.
Inspired by triangle.py (https://github.com/dfm/triangle.py) by Dan Foreman-Mackey (http://dan.iel.fm/).

Comments and Ratings (5)

Tien Tran

Can you give a attached example to this code? I am a new one, if you can, please send to my email daukhik1@yahoo.com.
Thanks

Greg

Really nice, thank you.

Will Adler

Nice catch, Ben. Fixed it. Thanks!

Ben Dichter

I found a small bug: The diagonal histograms do not respect user-specified bounds.

I fixed it with the following insertion at line 100:

data2hist = data(:,i);
data2hist(data2hist < bounds(1,i) | data2hist > bounds(2,i)) = NaN;
[n,x] = hist(data2hist, hist_bins);

Updates

1.5.0.0

new histogram style

1.4.0.0

updated screenshot

1.2.0.0

formatting, title

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: kernel density estimation

Inspired: Ensemble MCMC sampler