# Corner plots with latex / tikz / pgplots

I want to create corner plots like these ones:

https://i.stack.imgur.com/c21Pt.png

http://dfm.io/george/current/_images/ind-corner.png

In python there is a library called corner for this purpose. However, I want to recreate them from scratch with pgfplots / tikz. As input, I have the posterior samples for each variable. Does anyone have an idea how to do this? My search has come up short.

A first attempt but without the actually data (surprise). But i think you get the idea.

\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}

\begin{document}
\begin{tikzpicture}
\begin{groupplot}[
group style={
group size=3 by 3,
horizontal sep=5mm,
vertical sep=5mm,
xlabels at=edge bottom,
xticklabels at=edge bottom,
ylabels at=edge left,
yticklabels at=edge left,
},
]
% 1st row
\nextgroupplot[title={logMs = ...}]
\nextgroupplot[group/empty plot]
\nextgroupplot[group/empty plot]
% 2nd row
\nextgroupplot[ylabel={logDs}]
\nextgroupplot[title={logDs = ...}]