From 6bad0f5ccbde7e7af2415979058c8e8ddb1855cf Mon Sep 17 00:00:00 2001 From: Alexey Pechnikov Date: Mon, 24 Jun 2024 02:52:45 +0700 Subject: [PATCH] Add options to show AOI and POI on stack correlation plot --- pygmtsar/pygmtsar/Stack_phasediff.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pygmtsar/pygmtsar/Stack_phasediff.py b/pygmtsar/pygmtsar/Stack_phasediff.py index e2760197..514db0ef 100644 --- a/pygmtsar/pygmtsar/Stack_phasediff.py +++ b/pygmtsar/pygmtsar/Stack_phasediff.py @@ -959,7 +959,7 @@ def plot_correlations(self, data, caption='Correlation', cmap='auto', cols=4, si self.plots_AOI(fg, **kwargs) self.plots_POI(fg, **kwargs) - def plot_correlation_stack(self, data, threshold=None, caption='Correlation Stack', bins=100, cmap='auto'): + def plot_correlation_stack(self, data, threshold=None, caption='Correlation Stack', bins=100, cmap='auto', **kwargs): import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as mcolors @@ -995,7 +995,8 @@ def plot_correlation_stack(self, data, threshold=None, caption='Correlation Stac axs[0].axvline(threshold, linestyle='dashed', color='black', label=f'Threshold {threshold:0.3f}') else: data.where(data).plot.imshow(cmap=cmap, vmin=0, vmax=1, ax=axs[1]) - axs[0].legend() + self.plot_AOI(ax=axs[1], **kwargs) + self.plot_POI(ax=axs[1], **kwargs) plt.suptitle(caption) plt.tight_layout()