[tests working now?]

This commit is contained in:
mzwiessele 2015-10-07 00:52:47 +01:00
parent 5290e4bf0e
commit 7ebdc698f6
34 changed files with 42 additions and 33 deletions

View file

@ -76,7 +76,13 @@ class MatplotlibPlots(AbstractPlottingLibrary):
legend_ontop(ax, ncol=legend, fontdict=fontdict)
if zlim is not None:
ax.set_zlim(zlim)
#ax.figure.show()
ax.figure.canvas.draw()
ax.figure.show()
#try:
# ax.figure.tight_layout()
#except:
# # couldnt do tight layout, python 2.7 on MacOSX
# pass
ax.figure.canvas.draw()
return plots

View file

@ -35,7 +35,7 @@ def legend_ontop(ax, mode='expand', ncol=3, fontdict=None):
from mpl_toolkits.axes_grid1 import make_axes_locatable
handles, labels = ax.get_legend_handles_labels()
divider = make_axes_locatable(ax)
cax = divider.append_axes("top", "5%", pad="1%")
cax = divider.append_axes("top", "5%", pad=0)
lgd = cax.legend(handles, labels, bbox_to_anchor=(0., 0., 1., 1.), loc=3,
ncol=ncol, mode=mode, borderaxespad=0., prop=fontdict or {})
cax.set_axis_off()