@@ -132,13 +132,17 @@ def set_format_scatterplot(axScatter, max_cov):
132132 axScatter .xaxis .labelpad = 20
133133 return axScatter
134134
135- def set_format_covplot (axScatter , x_max , y_max , x_label , y_label ):
136- axScatter .set_xlabel (x_label , fontsize = 35 )
135+ def set_format_covplot (axScatter , x_max , y_max , x_label , y_label , scale , cov_lib ):
136+ axScatter .set_xlabel (x_label + " " + cov_lib , fontsize = 35 )
137137 axScatter .set_ylabel (y_label , fontsize = 35 )
138138 axScatter .grid (True , which = "major" , lw = 2. , color = WHITE , linestyle = '-' )
139139 axScatter .set_axisbelow (True )
140- axScatter .set_xlim ( (0.01 , x_max + 100 ) )
141- axScatter .set_ylim ( (0.01 , y_max + 100 ) ) # This sets the max-Coverage so that all libraries + sum are at the same scale
140+ if scale == 'log' :
141+ axScatter .set_xlim ( (0.01 , x_max + 100 ) )
142+ axScatter .set_ylim ( (0.01 , y_max + 100 ) )
143+ else :
144+ axScatter .set_xlim ( (- 10 , x_max + (x_max * 0.1 ) ) )
145+ axScatter .set_ylim ( (- 10 , y_max + (y_max * 0.1 ) ) )
142146 axScatter .xaxis .labelpad = 20
143147 axScatter .xaxis .labelpad = 20
144148 return axScatter
@@ -363,7 +367,7 @@ def plotScatterCov(self, cov_lib, cov_dict, info_flag, x_label, y_label, scale,
363367 # Setting up plots and axes
364368 plt .figure (1 , figsize = (35 ,35 ), dpi = 400 )
365369 axScatter = plt .axes (rect_scatter , axisbg = BGGREY , yscale = scale , xscale = scale )
366- axScatter = set_format_covplot (axScatter , x_max , y_max , x_label , y_label )
370+ axScatter = set_format_covplot (axScatter , x_max , y_max , x_label , y_label , scale , cov_lib )
367371 axHistx = plt .axes (rect_histx , axisbg = BGGREY )
368372 axHistx = set_format_hist_x_cov (axHistx , axScatter , scale )
369373 axHisty = plt .axes (rect_histy , axisbg = BGGREY )
0 commit comments