Ylabels in pm.forestplot

I used to be able to do pm.forestplot(...,ylabels=array_of_labels), but with the arviz integration it looks like I can’t anymore. Any idea on how to do this now?

The APIs are pretty complicated, so we tried to fall back to “base matplotlib” when possible. In this case, pm.forestplot returns a figure and an array of axes, so you can use

fig, ax = pm.plot_forest(trace, var_names='theta')
ax[0].set_yticklabels(range(10, 18));

1 Like

thanks, for the record, it looks like they should be passed in the reversed order. gave me a bit of headache. so it should be ax[0].set_yticklabels(ylabels[::-1]);