Plot posterior predictive results scatterplot in specific format using arviz

For your first example you can simply do (a tip @jessegrabowski gave a while ago):

posterior = idata.stack(sample = ['chain', 'draw']).posterior

Note that res_complete_indiv = idata (I generally prefer to use the name idata to follow PyMC
conventions). Then if you want to extract a parameter in numpy format you can use:

posterior['theta'].values

You can do the same with the posterior predictive:

preds = res.stack(sample = ['chain', 'draw']).posterior_predictive

Then plotting with plt is not really that cumbersome.

import matplotlib.pyplot as plt

chimps = panda_nuts.chimpanzee.values
pred_mean = preds['n'].values.mean(axis=1)

fig, ax = plt.subplots(1,1, figsize=(5,5))
ax.scatter(chimps, pred_mean, color='b', label="predicted means")
ax.set_xlabel("Chimp")
ax.set_ylabel("Nuts opened")
ax.legend()

image

As far as I know you cannot directly produce this type of scatter with Arviz. Hope I understood you question correctly and this helps.