Skip to content

Commit

Permalink
log colorbars now use nanmin / nanmax to avoid nans causing error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Jan 18, 2024
1 parent 6600a30 commit 9d6600b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoarray/plot/wrap/base/cmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def symmetric_cmap_from(self, symmetric_value=None):

def vmin_from(self, array: np.ndarray):
if self.config_dict["vmin"] is None:
return np.min(array)
return np.nanmin(array)
return self.config_dict["vmin"]

def vmax_from(self, array: np.ndarray):
if self.config_dict["vmax"] is None:
return np.max(array)
return np.nanmax(array)
return self.config_dict["vmax"]

def norm_from(self, array: np.ndarray, use_log10: bool = False) -> object:
Expand Down

0 comments on commit 9d6600b

Please sign in to comment.