@@ -422,13 +422,20 @@ def setupPlot(self, plot):
422
422
rect_scatter , rect_histx , rect_histy , rect_legend = set_canvas ()
423
423
# Setting up plots and axes
424
424
fig = plt .figure (1 , figsize = (35 ,35 ), dpi = 400 )
425
- axScatter = plt .axes (rect_scatter , facecolor = BGGREY )
425
+ try :
426
+ axScatter = plt .axes (rect_scatter , facecolor = BGGREY )
427
+ except AttributeError :
428
+ axScatter = plt .axes (rect_scatter , axisbg = BGGREY )
426
429
axScatter = set_format_scatterplot (axScatter , min_cov = self .min_cov , max_cov = self .max_cov , plot = plot )
427
430
axScatter .set_xlabel (self .xlabel )
428
431
axScatter .set_ylabel (self .ylabel )
429
- axHistx = plt .axes (rect_histx , facecolor = BGGREY )
432
+ try :
433
+ axHistx = plt .axes (rect_histx , facecolor = BGGREY )
434
+ axHisty = plt .axes (rect_histy , facecolor = BGGREY )
435
+ except AttributeError :
436
+ axHistx = plt .axes (rect_histx , axisbg = BGGREY )
437
+ axHisty = plt .axes (rect_histy , axisbg = BGGREY )
430
438
axHistx = set_format_hist_x (axHistx , axScatter )
431
- axHisty = plt .axes (rect_histy , facecolor = BGGREY )
432
439
axHisty = set_format_hist_y (axHisty , axScatter )
433
440
if self .hist_type == "span" :
434
441
axHistx .set_ylabel ("Span (kb)" )
@@ -438,7 +445,11 @@ def setupPlot(self, plot):
438
445
axHisty .set_xlabel ("Count" , rotation = 'horizontal' )
439
446
for xtick in axHisty .get_xticklabels (): # rotate text for ticks in cov histogram
440
447
xtick .set_rotation (270 )
441
- axLegend = plt .axes (rect_legend , facecolor = WHITE )
448
+
449
+ try :
450
+ axLegend = plt .axes (rect_legend , facecolor = WHITE )
451
+ except AttributeError :
452
+ axLegend = plt .axes (rect_legend , axisbg = WHITE )
442
453
axLegend .xaxis .set_major_locator (plt .NullLocator ())
443
454
axLegend .xaxis .set_major_formatter (nullfmt )
444
455
axLegend .yaxis .set_major_locator (plt .NullLocator ())
0 commit comments