[kernel ard plot] label adjustment

This commit is contained in:
mzwiessele 2014-08-27 16:20:53 -07:00
parent 8cf11257b0
commit 7bdbe21cd1

View file

@ -68,6 +68,8 @@ def plot_ARD(kernel, fignum=None, ax=None, title='', legend=False, filtering=Non
ard_params = np.atleast_2d(kernel.input_sensitivity(summarize=False))
bottom = 0
last_bottom = bottom
x = np.arange(kernel.input_dim)
if order is None:
@ -77,12 +79,13 @@ def plot_ARD(kernel, fignum=None, ax=None, title='', legend=False, filtering=Non
if kernel.parameters[i].name in order:
c = Tango.nextMedium()
bars.append(plot_bars(fig, ax, x, ard_params[i,:], c, kernel.parameters[i].name, bottom=bottom))
bottom += ard_params[i,:]
last_bottom = ard_params[i,:]
bottom += last_bottom
else:
print "filtering out {}".format(kernel.parameters[i].name)
ax.set_xlim(-.5, kernel.input_dim - .5)
add_bar_labels(fig, ax, [bars[-1]], bottom=bottom-ard_params[i,:])
add_bar_labels(fig, ax, [bars[-1]], bottom=bottom-last_bottom)
if legend:
if title is '':