diff --git a/oco_vistool.py b/oco_vistool.py index cd829b1..8965a69 100644 --- a/oco_vistool.py +++ b/oco_vistool.py @@ -1149,6 +1149,22 @@ def do_overlay_plot( if var_lat.ndim == 2: zip_it = np.ma.dstack([var_lon, var_lat]) + + # if the XML file exists for the chosen layer + if (layer_url != 'Null'): + cmap2, norm2, ticks_list, bounds_list, units = get_layer_colorbar_params(layer_url) + ax2 = plt.subplot(gs[-1, 2:-2]) + cb2 = mpl.colorbar.ColorbarBase(ax2, cmap=cmap2, norm=norm2, orientation = 'horizontal', + ticks = ticks_list + [bounds_list[0], bounds_list[-1]]) + + for t in cb2.ax.xaxis.get_ticklabels(): + t.set_weight("bold") + t.set_fontsize(8) + t.set_rotation(45) + + # if units were stated in the XML + if (units != None): + cb2.ax.set_xlabel('# in ' + units, fontdict=dict(weight='bold')) if color_or_cmap == "cmap" and var_vals.shape[0] > 0: @@ -1178,22 +1194,6 @@ def do_overlay_plot( for t in cb1.ax.yaxis.get_ticklabels(): t.set_weight("bold") t.set_fontsize(12) - - # if the XML file exists for the chosen layer - if (layer_url != 'Null'): - cmap, norm, ticks_list, bounds_list, units = get_layer_colorbar_params(layer_url) - ax2 = plt.subplot(gs[-1, 2:-2]) - cb2 = mpl.colorbar.ColorbarBase(ax2, cmap=cmap, norm=norm, orientation = 'horizontal', - ticks = ticks_list + [bounds_list[0], bounds_list[-1]]) - - for t in cb2.ax.xaxis.get_ticklabels(): - t.set_weight("bold") - t.set_fontsize(8) - t.set_rotation(45) - - # if units were stated in the XML - if (units != None): - cb2.ax.set_xlabel('# in ' + units, fontdict=dict(weight='bold')) if color_or_cmap == "color" and var_vals.shape[0] > 0: diff --git a/oco_vistool_config.json b/oco_vistool_config.json index 70375c0..8457d06 100644 --- a/oco_vistool_config.json +++ b/oco_vistool_config.json @@ -3,7 +3,7 @@ "geo_upper_left": [21, -159], "geo_lower_right": [17, -154], "region": "", - "layer": 10, + "layer": 4, "sensor": "Worldview", "oco2_overlay_info": { "file": "oco2_LtCO2_180711_B10206Ar_200730024539s.nc4",