A simpler draw function
Author: rohitdavasCreated Oct 21, 2020Updated Jan 17, 2021
In chapter03 draw_image function, I think the function can be better wrote as :

def drawTable(matrix):
data = np.asarray(matrix, str)
_, axes = plt.subplots()
axes.set_axis_off()
table(ax = axes,
cellText=data,
cellLoc='center',
bbox=[0,0,1,1],
edges='closed',
)
plt.savefig ("./example.png")
plt.close() 
Source: ShangtongZhang/reinforcement-learning-an-introduction