Skip to content

Commit

Permalink
change back to original matplotlib backend (#640)
Browse files Browse the repository at this point in the history
* change back to original matplotlib rcParams

* capture recent params
  • Loading branch information
sshen8 authored Apr 24, 2024
1 parent 7e799bc commit 9ce3a70
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions umi_tools/whitelist_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import copy
import regex

# require to run on systems with no X11
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.lines as mlines

Expand Down Expand Up @@ -100,6 +98,11 @@ def getKneeEstimateDensity(cell_barcode_counts,

if plotfile_prefix:

# change back to original user params after plotting
_rcParams_orig = matplotlib.rcParams.copy()
# require to run on systems with no X11
matplotlib.use('Agg')

# colour-blind friendly colours - https://gist.github.com/thriveth/8560036
CB_color_cycle = ['#377eb8', '#ff7f00', '#4daf4a',
'#f781bf', '#a65628', '#984ea3',
Expand Down Expand Up @@ -244,6 +247,8 @@ def getKneeEstimateDensity(cell_barcode_counts,

outf.write("%s\t%s\n" % (local_mins_count, threshold_type))

matplotlib.rcParams.update(_rcParams_orig)

return final_barcodes


Expand Down

0 comments on commit 9ce3a70

Please sign in to comment.