Dimension error when using az.plot_lm() when running tutorial notebook?

I am trying to run this tutorial notebook, and on PyMC 4.3, the following call returns an error:

    y_kwargs={"color": "C0", "marker": "o", "ms": 4, "alpha": 0.4},
    y_hat_fill_kwargs=dict(fill_kwargs={"alpha": 0.8}, color="xkcd:jade"),

The error message is ValueError: x and y must have same first dimension, but have shapes (100,) and (1,).

In contrast, the following minimalist example from arviz does work:

import arviz as az
import numpy as np
import xarray as xr
idata = az.load_arviz_data('regression1d')
x = xr.DataArray(np.linspace(0, 1, 100))
idata.posterior["y_model"] = idata.posterior["intercept"] + idata.posterior["slope"]*x
az.plot_lm(idata=idata, y="y", x=x)

I tried to inspect the two idata’s manually but couldn’t spot any issue. Does anyone have an idea?

Hi, sorry the question slipped through the cracks. I recently fixed a bug in plot_lm but I think it was a different one, and the notebook no longer uses it. Do you have a minimal example that shows the issue? data organization and facetting in plot_lm is quite convoluted but it might be fixable, I can take a look given the example to quickly play around and test it