Ниже сценария создайте диаграмму и массив в верхнем левом углу.
Как мы можем выдвинуть массив, чтобы мы не могли видеть ось Y через него?
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
fig = plt.figure(figsize=(13,4))
ax = fig.gca()
f = lambda x : np.power(1.2, x)
x0 = np.arange(*(0,100))
y0 = f(x0)
ax.plot(x0,y0)
ax.legend(['f(x)'])
ax.set_title('Exp')
index = ['index1', 'index2', 'index3', 'index4', 'index5']
values = [['1'], ['2'], ['3'], ['4'], ['5']]
table = ax.table(cellText=values, colWidths=[0.15, 0.15], rowLabels=index, loc='upper left')
plt.show()