Skip to content

Commit

Permalink
Fix case when changing from linear color-coding to fixed color for de…
Browse files Browse the repository at this point in the history
…nsity map
  • Loading branch information
astrofrog committed Oct 29, 2017
1 parent 2d911de commit dd6c791
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions glue/viewers/scatter/layer_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ def _update_visual_attributes(self, changed, force=False):
if self.state.cmap_mode == 'Fixed':
if force or 'color' in changed or 'cmap_mode' in changed:
self.density_artist.set_color(self.state.color)
self.density_artist.set_c(None)
self.density_artist.set_clim(self.density_auto_limits.min,
self.density_auto_limits.max)
elif force or any(prop in changed for prop in CMAP_PROPERTIES):
c = self.layer[self.state.cmap_att].ravel()
set_mpl_artist_cmap(self.density_artist, c, self.state)
Expand Down

0 comments on commit dd6c791

Please sign in to comment.