Layout of (nrows)x(ncols) must be larger than required size (nplots)
Package:
pandas
30911

Exception Class:
ValueError
Raise code
ncols == -1 and nrows > 0:
layout = nrows, ncols = (nrows, ceil(nplots / nrows))
elif ncols <= 0 and nrows <= 0:
msg = "At least one dimension of layout must be positive"
raise ValueError(msg)
if nrows * ncols < nplots:
raise ValueError(
f"Layout of {nrows}x{ncols} must be larger than required size {nplots}"
)
return layout
if layout_type == "single":
return (1, 1)
elif lay
Links to the raise (1)
https://github.com/pandas-dev/pandas/blob/b3e335254f46a526ee3ce9bb757eac4011d9d1fe/pandas/plotting/_matplotlib/tools.py#L97Ways to fix
df_to_plot.plot(subplots=True, layout=(4,4), kind='box', figsize=(50,6), patch_artist=True)
plt.subplots_adjust(wspace=0.5);
df_to_plot.plot(subplots=True, layout=(4,4), kind='box', figsize=(50,6), patch_artist=True)
plt.subplots_adjust(wspace=0.5);
Add a possible fix
Please authorize to post fix