Skip to content

fontsize kwarg in ax.table() has no effect #30653

@ABHIRANJAN-KUMAR1

Description

@ABHIRANJAN-KUMAR1

Summary

Passing the fontsize argument to matplotlib.pyplot.table (or Axes.table) has no visible effect — the table renders using the default font size, ignoring the passed value.


Code to Reproduce

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0, 10, 100)
y = x + 1
tableData = [['a', 1], ['b', 1]]

fig, ax = plt.subplots()
ax.plot(x, y)
t = ax.table(
    cellText=tableData,
    loc='top',
    cellLoc='center',
    fontsize=30  # <-- Has no effect
)
plt.show()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions