Skip to content

Commit

Permalink
fix bad stripping of legend names
Browse files Browse the repository at this point in the history
  • Loading branch information
RaverJay committed Feb 25, 2021
1 parent cf4b7e6 commit 4b6c4d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastcov.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def plot(args, chunk, data) -> str:
plt.xticks(locs, [f'{int(pos):,}' for pos in locs])
plt.xlim(xlims)

short_names = [name.rsplit('/', 1)[-1].rstrip('.bam') for name in data.columns]
short_names = [name.rsplit('/', 1)[-1][:-4] if name.endswith('.bam') else name.rsplit('/', 1)[-1] for name in data.columns]
plt.legend(labels=short_names)

# save figure
Expand Down

0 comments on commit 4b6c4d4

Please sign in to comment.