[I ][1] I can not figure out why the glm posterior predictive is not plotting over the entire data, but only over a fraction of it. And there seem to be no parameters which can alter these. This is the code which generates the following problematic plot.
plt.figure(figsize=(7, 7))
x = np.linspace(0,10,30)
y = x + np.random.normal(2,0.6,len(x))
plt.scatter(x,y)
data = dict(x=x, y=y)
with pm.Model() as model:
pm.glm.GLM.from_formula('y ~ x', data)
trace = pm.sample(1000)
plt.plot(x, y, 'x', label='data')
pm.plot_posterior_predictive_glm(trace, samples=100,label='posterior predictive
regression lines')
plt.plot(x, trace['Intercept'].mean() + trace['x'].mean()*x, label='true regression
line', lw=3., c='y')
plt.title('Posterior predictive regression lines')
plt.legend(loc=0)
plt.xlabel('x')
plt.ylabel('y');