plotting and more about classes the code pylab figure( #create figure pylab plot([ , , , ][ , , , ]#draw on figure pylab figure( #create figure pylab plot([ , , , ][ , , , ]#draw on figure pylab savefig('figure-addie'#save figure pylab figure( #go back to working on figure pylab plot([ , , , ]#draw again on figure pylab savefig('figure-jane'#save figure produces and saves to files named figure-jane png and figure-addie png the two plots below observe that the last call to pylab plot is passed only one argument this argument supplies the values the corresponding values default to range(len([ ]))which is why they range from to in this case contents of figure-jane png contents of figure-addie png pylab has notion of "current figure executing pylab figure(xsets the current figure to the figure numbered subsequently executed calls of plotting functions implicitly refer to that figure until another invocation of pylab figure occurs this explains why the figure written to the file figure-addie png was the second figure created let' look at another example the code principal #initial investment interestrate years values [for in range(years )values append(principalprincipal +principal*interestrate pylab plot(valuesproduces the plot on the left below