From 7bdbe21cd1bd2f848dc325f0019fe805771e3644 Mon Sep 17 00:00:00 2001 From: mzwiessele Date: Wed, 27 Aug 2014 16:20:53 -0700 Subject: [PATCH] [kernel ard plot] label adjustment --- GPy/plotting/matplot_dep/kernel_plots.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/GPy/plotting/matplot_dep/kernel_plots.py b/GPy/plotting/matplot_dep/kernel_plots.py index 60b5fa7c..db43f147 100644 --- a/GPy/plotting/matplot_dep/kernel_plots.py +++ b/GPy/plotting/matplot_dep/kernel_plots.py @@ -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 '':