From 12640a2d1710a24798b4e51a1865e6e37202bc47 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Fri, 28 Jun 2013 11:02:15 +0100 Subject: [PATCH] plot ard ticks improved --- GPy/kern/kern.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GPy/kern/kern.py b/GPy/kern/kern.py index 4bb4752f..5cd90749 100644 --- a/GPy/kern/kern.py +++ b/GPy/kern/kern.py @@ -82,9 +82,10 @@ class kern(Parameterized): else: ard_params = 1. / p.lengthscale - ax.bar(np.arange(len(ard_params)) - 0.4, ard_params) - ax.set_xticks(np.arange(len(ard_params))) - ax.set_xticklabels([r"${}$".format(i) for i in range(len(ard_params))]) + x = np.arange(len(ard_params)) + ax.bar(x - 0.4, ard_params) + ax.set_xticks(x) + ax.set_xticklabels([r"${}$".format(i) for i in x]) return ax def _transform_gradients(self, g):