#NEWLINE# def _draw_contour_plot( evaluation , plot_config ) : #NEWLINE# #INDENT# '' #NEWLINE# lats = plot_config [ 'lats' ] #NEWLINE# if ( type ( lats ) != type ( list ) ) : #NEWLINE# #INDENT# lats = np . arange ( lats [ 'range_min' ] , lats [ 'range_max' ] , lats [ 'range_step' ] ) #NEWLINE# #UNINDENT# lons = plot_config [ 'lons' ] #NEWLINE# if ( type ( lons ) != type ( list ) ) : #NEWLINE# #INDENT# lons = np . arange ( lons [ 'range_min' ] , lons [ 'range_max' ] , lons [ 'range_step' ] ) #NEWLINE# #UNINDENT# for ( i , index ) in enumerate ( plot_config [ 'results_indices' ] ) : #NEWLINE# #INDENT# if ( len ( index ) == 2 ) : #NEWLINE# #INDENT# ( target , metric ) = index #NEWLINE# vals = evaluation . results [ target ] [ vals ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( index ) == 3 ) : #NEWLINE# #INDENT# ( target , metric , subregion ) = index #NEWLINE# vals = evaluation . results [ target ] [ metric ] [ subregion ] #NEWLINE# #UNINDENT# #UNINDENT# plot_name = ( plot_config [ 'output_name' ] + '_{}' . format ( i ) ) #NEWLINE# plots . draw_contour_map ( vals , np . array ( lats ) , np . array ( lons ) , plot_name , ** plot_config . get ( 'optional_args' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) )