From 830aeabcc793315de3a642f6b19c5740b31a3e9d Mon Sep 17 00:00:00 2001 From: CyanideCN Date: Tue, 16 Jul 2024 20:08:41 -0700 Subject: [PATCH] fix: specify the axes for colorbar --- cinrad/visualize/rhi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinrad/visualize/rhi.py b/cinrad/visualize/rhi.py index 18f75d4..43800b6 100644 --- a/cinrad/visualize/rhi.py +++ b/cinrad/visualize/rhi.py @@ -85,7 +85,7 @@ def _plot(self): plt.xticks(np.array([0, 0.2, 0.4, 0.6, 0.8, 1]) * cor_max, ticks) plt.ylabel("Height (km)", **plot_kw) ## 修改于2019-01-22 By WU Fulang sm = ScalarMappable(norm=norm, cmap=cmap) - plt.colorbar(sm) + plt.colorbar(sm, ax=plt.gca()) def __call__(self, fpath: str): if os.path.isdir(fpath):