From 874b97ca31f8828899d317286f4e985c60b3054d Mon Sep 17 00:00:00 2001 From: Claudio Satriano Date: Tue, 2 Apr 2024 23:13:36 +0200 Subject: [PATCH] Fix colorbar zorder in plot_slip and plot_timespans --- requake/plot/plot_slip.py | 1 + requake/plot/plot_timespans.py | 1 + 2 files changed, 2 insertions(+) diff --git a/requake/plot/plot_slip.py b/requake/plot/plot_slip.py index 91d3dfb..fc3da5f 100644 --- a/requake/plot/plot_slip.py +++ b/requake/plot/plot_slip.py @@ -80,6 +80,7 @@ def plot_slip(config): ax.set_ylabel('Cumulative Slip (cm)') sm = cm.ScalarMappable(cmap=cmap, norm=norm) cbar = fig.colorbar(sm, ticks=range(10), ax=ax) + cbar.ax.set_zorder(-1) cbar.ax.set_ylabel('mod(family number, 10)') # Empty annotation that will be updated interactively diff --git a/requake/plot/plot_timespans.py b/requake/plot/plot_timespans.py index 1e85967..8e07aaa 100644 --- a/requake/plot/plot_timespans.py +++ b/requake/plot/plot_timespans.py @@ -98,6 +98,7 @@ def plot_timespans(config): ax.set_ylabel(ylabel) sm = cm.ScalarMappable(cmap=cmap, norm=norm) cbar = fig.colorbar(sm, ticks=range(10), ax=ax) + cbar.ax.set_zorder(-1) cbar.ax.set_ylabel('mod(family number, 10)') # Empty annotation that will be updated interactively