diff --git a/myplot_inputs.py b/myplot_inputs.py index ec279d7..d010446 100644 --- a/myplot_inputs.py +++ b/myplot_inputs.py @@ -94,10 +94,11 @@ def myplot_create_cbar(cbar_min, cbar_max, num=[]): import numpy as np from math import floor # round values - if abs(cbar_max) > abs(cbar_min): - fac = floor(np.log10(abs(cbar_max))) - else: - fac = floor(np.log10(abs(cbar_min))) + fac = floor(np.log10(abs(cbar_max-cbar_min))) + #if abs(cbar_max) > abs(cbar_min): + # fac = floor(np.log10(abs(cbar_max))) + #else: + # fac = floor(np.log10(abs(cbar_min))) fac = fac-1 cbar_max = round(cbar_max,-int(fac)) cbar_min = round(cbar_min,-int(fac))