<s> import nmrglue as ng <EOL> import numpy as np <EOL> import matplotlib . pyplot as plt <EOL> import matplotlib . cm <EOL> cmap = matplotlib . cm . Blues_r <EOL> contour_start = <NUM_LIT> <EOL> contour_num = <NUM_LIT:20> <EOL> contour_factor = <NUM_LIT> <EOL> textsize = <NUM_LIT:6> <EOL> cl = contour_start * contour_factor ** np . arange ( contour_num ) <EOL> dic , data = ng . pipe . read ( "<STR_LIT>" ) <EOL> peak_list = np . recfromtxt ( "<STR_LIT>" ) <EOL> fig = plt . figure ( ) <EOL> ax = fig . add_subplot ( <NUM_LIT> ) <EOL> ax . contour ( data , cl , cmap = cmap , <EOL> extent = ( <NUM_LIT:0> , data . shape [ <NUM_LIT:1> ] - <NUM_LIT:1> , <NUM_LIT:0> , data . shape [ <NUM_LIT:0> ] - <NUM_LIT:1> ) ) <EOL> for name , x0 , y0 , x1 , y1 in peak_list : <EOL> if x0 > x1 : <EOL> x0 , x1 = x1 , x0 <EOL> if y0 > y1 : <EOL> y0 , y1 = y1 , y0 <EOL> ax . plot ( [ x0 , x1 , x1 , x0 , x0 ] , [ y0 , y0 , y1 , y1 , y0 ] , '<STR_LIT:k>' ) <EOL> ax . text ( x1 + <NUM_LIT:1> , y0 , name , size = textsize , color = '<STR_LIT:r>' ) <EOL> ax . set_xlim ( <NUM_LIT> , <NUM_LIT> ) <EOL> ax . set_ylim ( <NUM_LIT> , <NUM_LIT> ) <EOL> fig . savefig ( "<STR_LIT>" ) </s>
