From 8dedac7cc523d5ac6e245931d019af8aa722c9e4 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Fri, 6 Oct 2023 10:40:18 -0400 Subject: [PATCH] Fix colorbar tick placements for data in range of 1..100 gcpy/six_plot.py - In routine "colorbar_for_small_data_range", now use pos = [vmin, vmin+vrange*0.25, vmin+vrange*0.5, vmin+vrange*0.75, vmax] which should place the intermediate tickpoints symmetrically. Signed-off-by: Bob Yantosca --- gcpy/plot/six_plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcpy/plot/six_plot.py b/gcpy/plot/six_plot.py index 807a68e0..b4db49aa 100644 --- a/gcpy/plot/six_plot.py +++ b/gcpy/plot/six_plot.py @@ -930,7 +930,7 @@ def colorbar_for_small_data_range( # Otherwise place ticks symmetrically along the data range vrange = vmax - vmin - pos = [vmin, vrange*0.25, vrange*0.5, vrange*0.75, vmax] + pos = [vmin, vmin+vrange*0.25, vmin+vrange*0.5, vmin+vrange*0.75, vmax] cbar.set_ticks(pos) cbar.formatter = ticker.ScalarFormatter() cbar.formatter.set_useOffset(False)