Closed jamaa closed 6 years ago
Thank you reporting this bug, I corrected by adding/substracting a constant value to color map bounds.
Thanks for the quick fix. However, it does not work in all cases. When min and max are equal, but some random float value, the following works better (line 1139 in workflow\util.py):
if abs(max_value - min_value) < EPS_VALUE:
I tried to improved the correction when min and max are equal by using a relative value.
Indeed an absolute value/correction has some limitations for very low (values can not be displayed, the correction being too high) and very high values (the correction might be cancelled by truncation errors).
EPS_VALUE
is now a relative value which is set to 0.001 (=0.1%). The relative difference between min and max values is at least equal to 2*EPS_VALUE.
Sorry for this new correction, I hope you will not get into troubles again with the colormap levels being not increasing.
Thanks, that works.
When attempting to plot a variable (vertical cross section) whose min and max values are equal (e.g. both 0), PyTelTools crashes. Here is the traceback:
I was able to work around this by adding some code to artificially increase the max value in replot(), but I'm sure there is a more elegant way of handling this.