colorbar() (Matplotlib)

fig.colorbar() adds a color-scale legend beside a plot, showing which colors of a colormap correspond to which data values. It is the key that makes a…