Consider this example:
df = pd.DataFrame({"row": [1,1,2,2,3,3,4,4], "col": pd.Categorical([1,7,1,7,1,7,1,7], categories=[1,2,3,4,5,6,7]), "x": 1, "y": 1})
ggplot(df, aes("x", "y")) + geom_point() + facet_grid("row", "col")
This raises
IndexError: single positional indexer is out-of-bounds
This situation can occur when subsetting a dataframe for plotting. The reason is that the matrix multiplication in niteraction does not return unique IDs, so the number of panels is incosistent between what is needed and what is reserved.
I'm on plotnine 0.14.5.