diff --git a/pandas/plotting/_misc.py b/pandas/plotting/_misc.py index d8455f44ef0d1..03701f8778065 100644 --- a/pandas/plotting/_misc.py +++ b/pandas/plotting/_misc.py @@ -39,7 +39,7 @@ def table(ax: Axes, data: DataFrame | Series, **kwargs) -> Table: **kwargs Keyword arguments to be passed to matplotlib.table.table. If `rowLabels` or `colLabels` is not specified, data index or column - name will be used. + names will be used. Returns ------- @@ -59,11 +59,11 @@ def table(ax: Axes, data: DataFrame | Series, **kwargs) -> Table: >>> import matplotlib.pyplot as plt >>> df = pd.DataFrame({"A": [1, 2], "B": [3, 4]}) - >>> fix, ax = plt.subplots() + >>> fig, ax = plt.subplots() >>> ax.axis("off") (0.0, 1.0, 0.0, 1.0) >>> table = pd.plotting.table( - ... ax, df, loc="center", cellLoc="center", colWidths=list([0.2, 0.2]) + ... ax, df, loc="center", cellLoc="center", colWidths=[0.2, 0.2] ... ) """ plot_backend = _get_plot_backend("matplotlib")