Skip to content

Commit

Permalink
Update plot.py
Browse files Browse the repository at this point in the history
vmax = max(1, color_max)
  • Loading branch information
yil8 committed Oct 1, 2015
1 parent 0af8ae4 commit d748b3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyloh/postprocess/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def plot_BAF_heatmap_by_segment(BAF_counts, seg_name, outheatmap_dir_name):
pyplot.yticks(scipy.linspace(0, 100, 11), scipy.linspace(0, 1, 11))
pyplot.xlabel('Tumor sample B allele frequency')
pyplot.ylabel('Normal sample B allele frequency')
pyplot.imshow(BAF_counts, vmin = 0, vmax = color_max)
pyplot.imshow(BAF_counts, vmin = 0, vmax = max(1, color_max))
cbar = pyplot.colorbar(ticks=[0, color_max], orientation='vertical', shrink=0.78)
cbar.ax.set_yticklabels(['0', '>= ' + str(int(color_max))])
pyplot.savefig('./' + outheatmap_dir_name + '/' + seg_name, bbox_inches='tight')


0 comments on commit d748b3d

Please sign in to comment.