Skip to content
Snippets Groups Projects
Commit 9ba0c16a authored by Richard Fuchs's avatar Richard Fuchs
Browse files

logplot, set 0 values to 1

parent a49eb14c
No related branches found
No related tags found
No related merge requests found
Pipeline #199149 failed
...@@ -58,6 +58,9 @@ def plot_sky(field, label=None, name=None, cmap='inferno', vmin=None, vmax=None, ...@@ -58,6 +58,9 @@ def plot_sky(field, label=None, name=None, cmap='inferno', vmin=None, vmax=None,
def plot_im(axs, val, dom, lbl, cmap, vmin, vmax, norm, nticks): def plot_im(axs, val, dom, lbl, cmap, vmin, vmax, norm, nticks):
if norm == 'log':
val = val.copy()
val[val==0] = 1.
im = plt.imshow(val.T, norm=norm, cmap=cmap, vmin=vmin, vmax=vmax, origin='lower') im = plt.imshow(val.T, norm=norm, cmap=cmap, vmin=vmin, vmax=vmax, origin='lower')
div_i = make_axes_locatable(axs[-1]) div_i = make_axes_locatable(axs[-1])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment