In [1]:
%matplotlib inline
The popular triangle.py
provides an easy way to produce publication quality corner plots having fun MCMC simulations. However, these have a large corner which often goes to waste. Here I present an easy method to use this corner:
In [14]:
import matplotlib.pyplot as plt
import numpy
import triangle
from __future__ import division
data = np.random.normal(0, 1, (1000, 5))
fig = triangle.corner(data)
dim = data.shape[-1]
subplot_dim = int(np.floor(dim/2))
ax = plt.subplot2grid((dim, dim), (0, dim-subplot_dim),
colspan=subplot_dim, rowspan=subplot_dim)
plt.show()
And there you are, the ax object can be added to as you wish!
In [ ]: