Commit 1e90d84e authored by Nils Brüggemann's avatar Nils Brüggemann
Browse files

pyicon/pyicon_plotting.py: Use datai.copy() instead of 1.*datai to copy data....

pyicon/pyicon_plotting.py: Use datai.copy() instead of 1.*datai to copy data. Hopefully more stable and with better performance.
parent 00035b33
Pipeline #14874 passed with stages
in 10 seconds
......@@ -436,7 +436,8 @@ def shade(
# raise ValueError('::: Error: Only one of use_pcol or use_contf can be True. :::')
# --- mask 0 and negative values in case of log plot
data = 1.*datai
#data = 1.*datai
data = datai.copy()
if logplot and isinstance(data, np.ma.MaskedArray):
data[data<=0.0] = np.ma.masked
data = np.ma.log10(data)
......@@ -1709,7 +1710,8 @@ def patch_plot_patches_from_bnds(clon_bnds, clat_bnds, vlon_bnds, vlat_bnds, cel
def patch_plot_shade(patches, datai, clim='auto', cmap='auto', ax='auto', cax='auto', edgecolor='none', logplot=False, cborientation='vertical'):
# --- mask 0 and negative values in case of log plot
data = 1.*datai
#data = 1.*datai
data = datai.copy()
if logplot and isinstance(data, np.ma.MaskedArray):
data[data<=0.0] = np.ma.masked
data = np.ma.log10(data)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment