From 4fa8005800d0ed24c57fe63ccace338f4ea0d202 Mon Sep 17 00:00:00 2001 From: Zhenwen Dai Date: Mon, 21 Sep 2015 16:38:06 +0100 Subject: [PATCH] bug fix for model_plots when specifying which_data_ycols --- GPy/plotting/matplot_dep/models_plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPy/plotting/matplot_dep/models_plots.py b/GPy/plotting/matplot_dep/models_plots.py index c0864604..02b0958a 100644 --- a/GPy/plotting/matplot_dep/models_plots.py +++ b/GPy/plotting/matplot_dep/models_plots.py @@ -63,7 +63,7 @@ def plot_data(model, which_data_rows='all', for d in which_data_ycols: plots['dataplot'].append(ax.plot(X[which_data_rows, free_dims], Y[which_data_rows, d], data_symbol, mew=mew)) if X_variance is not None: - plots['xerrorbar'] = ax.errorbar(X[which_data_rows, free_dims].flatten(), Y[which_data_rows, which_data_ycols].flatten(), + plots['xerrorbar'] = ax.errorbar(X[which_data_rows, free_dims].flatten(), Y[which_data_rows, d].flatten(), xerr=2 * np.sqrt(X_variance[which_data_rows, free_dims].flatten()), ecolor='k', fmt='none', elinewidth=.5, alpha=.5)