Skip to content

Commit 2d7b0ad

Browse files
committed
set all bad colors to grey
1 parent f779201 commit 2d7b0ad

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pyhdx/plot.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -715,16 +715,17 @@ def cmap_norm_from_nodes(colors, nodes, bad=None):
715715
return cmap, norm
716716

717717

718-
def set_bad(cmap, color):
718+
def set_bad(cmap, color='#8c8c8c'):
719719
cmap.set_bad(color)
720720
return cmap
721721

722+
722723
cmap_defaults = {
723-
'dG': pplt.Colormap(tol_cmap('rainbow_PuRd')).reversed(),
724-
'ddG': tol_cmap('PRGn').reversed(),
725-
'rfu': set_bad(pplt.Colormap(cc.cm.gouldian), '#8c8c8c'),
726-
'drfu': set_bad(pplt.Colormap(cc.cm.diverging_bwr_20_95_c54), '#8c8c8c'),
727-
'mse': set_bad(pplt.Colormap('cividis'), '#8c8c8c')
724+
'dG': set_bad(pplt.Colormap(tol_cmap('rainbow_PuRd')).reversed()),
725+
'ddG': set_bad(tol_cmap('PRGn').reversed()),
726+
'rfu': set_bad(pplt.Colormap(cc.cm.gouldian)),
727+
'drfu': set_bad(pplt.Colormap(cc.cm.diverging_bwr_20_95_c54)),
728+
'mse': set_bad(pplt.Colormap('cividis'))
728729
}
729730

730731
norm_defaults = {

0 commit comments

Comments
 (0)