I have this piece of code that displays the policies for a robot. The polices are essentially colourful squares that represent a value. Right now the squares have a colour and I have placed in a colour bar to show what those colours represent. But I would like to have it so that each value that is represented by the colour of the square is on each square itself. How could I do this?
def show_policy(self, policy=None):
plt.title("Policies for Robot")
plt.imshow(self.policy)
plt.colorbar()
plt.show()