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()
Summary
Passing the
fontsizeargument tomatplotlib.pyplot.table(orAxes.table) has no visible effect — the table renders using the default font size, ignoring the passed value.Code to Reproduce