#NEWLINE# def __init__( self , fig , root , xstart , xend , ystart , yend , pad , ymin , ymax , bins , title , subtitle , patchstart = None ) : #NEWLINE# #INDENT# ( width , height ) = ( ( xend - xstart ) , ( yend - ystart ) ) #NEWLINE# y = ( ystart - pad ) #NEWLINE# HorizontalChromosome ( root , xstart , xend , y , patch = patchstart , height = 0.03 ) #NEWLINE# lsg = 'lightslategrey' #NEWLINE# root . plot ( [ ( xstart - pad ) , ( xstart - pad ) ] , [ ystart , ( ystart + height ) ] , lw = 2 , color = lsg ) #NEWLINE# root . plot ( [ ( xend + pad ) , ( xend + pad ) ] , [ ystart , ( ystart + height ) ] , lw = 2 , color = lsg ) #NEWLINE# root . text ( ( ( xstart + xend ) / 2 ) , ( ( ystart + height ) + ( 2 * pad ) ) , title , ha = 'center' , va = 'center' , color = lsg ) #NEWLINE# iv = ( ( ymax - ymin ) / bins ) #NEWLINE# iv_height = ( height / bins ) #NEWLINE# val = ymin #NEWLINE# yy = ystart #NEWLINE# while ( val <= ymax ) : #NEWLINE# #INDENT# root . text ( ( xstart - ( 2 * pad ) ) , yy , str ( val ) , ha = 'right' , va = 'center' , size = 10 ) #NEWLINE# val += iv #NEWLINE# yy += iv_height #NEWLINE# #UNINDENT# root . text ( ( ( xstart + xend ) / 2 ) , ( y - 0.05 ) , subtitle , ha = 'center' , va = 'center' , color = lsg ) #NEWLINE# self . axes = fig . add_axes ( [ xstart , ystart , width , height ] )