now that we have sample plot donelet' look at how different objects interact in the matplotlib universe as mentionedthe figure object is the top-most container of all elements before complicating thingswe begin by first plotting different figuresi each figure containing only single plot the following snippet plots sine and cosine wave in two different figures using numpy and matplotlib first figure plt figure( plt plot( ,yplt title('fig sine curve'plt xlabel(' -axis'plt ylabel(' -axis'second figure plt figure( =np cos(xplt plot( ,yplt title('fig cosine curve'plt xlabel(' -axis'plt ylabel(' -axis'the statement plt figure(creates an instance of type figure the number passed in as parameter is the figure identifierwhich is helpful while referring to the same figure in case multiple exist the rest of the statements are similar to our sample plot with pyplot always referring to the current figure object to draw to note that the moment new figure is instantiatedpyplot refers to the newly created objects unless specified otherwise the output generated is shown in figure -