Please help me with this fig.canvas codes from guvi DL COurse

What does these functions in figure.canvas do? What is figure.canvas?

  • fig.canvas.draw()
  • fig.canvas.get_width_height()
  • fig.canvas.tostring_rgb()

What is fig.canvas if you could explain in detail. Also what does this code do:

image = np.frombuffer(fig.canvas.tostring_rgb())

I tried hard but could not get any documentation related to them. Are they obsolete?

Please help me I’m stuck