plotting behaviour adapted for BGPLVM

This commit is contained in:
Max Zwiessele 2013-06-04 18:25:28 +01:00
parent cadf822292
commit 2b0858b697
2 changed files with 9 additions and 7 deletions

View file

@ -257,16 +257,15 @@ class MRD(model):
return Z
def _handle_plotting(self, fignum, ax, plotf):
if ax is None:
fig = pylab.figure(num=fignum)
ax = fig.add_subplot(111)
if ax is None:
fig = pylab.figure(num=fignum, figsize=(4 * len(self.bgplvms), 3))
for i, g in enumerate(self.bgplvms):
if ax is None:
ax = fig.add_subplot(1, len(self.bgplvms), i + 1)
else:
elif isinstance(ax, (tuple, list)):
ax = ax[i]
else:
raise ValueError("Need one ax per latent dimension Q")
plotf(i, g, ax)
pylab.draw()
if ax is None: