#NEWLINE# def panels( self ) : #NEWLINE# #INDENT# self . fig . set_facecolor ( 'w' ) #NEWLINE# method_dispatch = { #NEWLINE# #INDENT# 'ip' : self . ip_panel , #NEWLINE# 'control' : self . control_panel , #NEWLINE# 'peaks' : self . peaks_panel , #NEWLINE# 'genes' : self . genes_panel , #NEWLINE# #UNINDENT# } #NEWLINE# if ( self . db and self . peaks ) : #NEWLINE# #INDENT# gs = gridspec . GridSpec ( 4 , 1 , height_ratios = [ 1 , 1 , 0.15 , 0.5 ] ) #NEWLINE# ip_ax = plt . subplot ( gs [ 0 ] ) #NEWLINE# control_ax = plt . subplot ( gs [ 1 ] , sharex = ip_ax , sharey = ip_ax ) #NEWLINE# peaks_ax = plt . subplot ( self [ 2 ] , sharex = ip_ax ) #NEWLINE# gene_ax = plt . subplot ( gs [ 3 ] , sharex = ip_ax ) #NEWLINE# axes = { #NEWLINE# #INDENT# 'ip' : ip_ax , #NEWLINE# 'control' : control_ax , #NEWLINE# 'peaks' : peaks_ax , #NEWLINE# 'genes' : gene_ax , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . db and ( self . peaks is None ) ) : #NEWLINE# #INDENT# gs = gridspec . GridSpec ( 3 , 1 , height_ratios = [ 1 , 1 , 0.5 ] ) #NEWLINE# ip_ax = plt . subplot ( gs [ 0 ] ) #NEWLINE# control_ax = plt . subplot ( gs [ 1 ] , sharex = ip_ax , sharey = ip_ax ) #NEWLINE# gene_ax = plt . subplot ( gs [ 2 ] , sharex = ip_ax ) #NEWLINE# axes = { #NEWLINE# #INDENT# 'ip' : ip_ax , #NEWLINE# 'control' : control_ax , #NEWLINE# 'genes' : gene_ax , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( self . db is None ) and self . peaks ) : #NEWLINE# #INDENT# gs = gridspec . GridSpec ( 3 , 1 , height_ratios = [ 1 , 1 , 0.3 ] ) #NEWLINE# ip_ax = plt . subplot ( gs [ 0 ] ) #NEWLINE# control_ax = plt . subplot ( gs [ 1 ] , sharex = ip_ax , sharey = ip_ax ) #NEWLINE# peaks_ax = plt . subplot ( gs [ 2 ] , sharex = ip_ax ) #NEWLINE# axes = { #NEWLINE# #INDENT# 'ip' : ip_ax , #NEWLINE# 'control' : control_ax , #NEWLINE# 'peaks' : peaks_ax , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( self . db is None ) and ( self . peaks is None ) ) : #NEWLINE# #INDENT# gs = gridspec . GridSpec ( 2 , 1 , height_ratios = [ 1 , 1 ] ) #NEWLINE# ip_ax = plt . subplot ( gs [ 0 ] ) #NEWLINE# control_ax = plt . subplot ( gs [ 1 ] , sharex = ip_ax , sharey = ip_ax ) #NEWLINE# axes = { #NEWLINE# #INDENT# 'ip' : ip_ax , #NEWLINE# 'control' : control_ax , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# self . axes = axes #NEWLINE# self . gridspec = gs #NEWLINE# mapping = [ ] #NEWLINE# for kind in [ 'ip' , 'control' , 'peaks' , 'genes' ] : #NEWLINE# #INDENT# if ( kind in axes ) : #NEWLINE# #INDENT# mapping . append ( ( axes [ kind ] , method_dispatch [ kind ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . _first_ax = mapping [ 0 ] [ 0 ] #NEWLINE# self . _last_ax = mapping [ ( - 1 ) ] [ 0 ] #NEWLINE# return mapping