diff --git a/pandas/plotting/_matplotlib/tools.py b/pandas/plotting/_matplotlib/tools.py index 6c315c4dce184..d152735842f45 100644 --- a/pandas/plotting/_matplotlib/tools.py +++ b/pandas/plotting/_matplotlib/tools.py @@ -130,7 +130,7 @@ def _get_layout( try: return layouts[nplots] except KeyError: - k = floor(log2(nplots)) + k = floor(log2(nplots)) + 1 if (k - 1) * k >= nplots: return k, (k - 1)