#NEWLINE# def analyze( context = None , results = None ) : #NEWLINE# #INDENT# import matplotlib.pyplot as plt #NEWLINE# ax1 = plt . subplot ( 211 ) #NEWLINE# results . portfolio_value . plot ( ax = ax1 ) #NEWLINE# ax1 . set_ylabel ( 'Portfolio value (USD)' ) #NEWLINE# ax2 = plt . subplot ( 212 , sharex = ax1 ) #NEWLINE# results . AAPL . plot ( ax = ax2 ) #NEWLINE# ax2 . set_ylabel ( 'AAPL price (USD)' ) #NEWLINE# plt . gcf ( ) . set_size_inches ( 18 , 8 ) #NEWLINE# plt . show ( )