Skip to content

Commit

Permalink
Add options to show AOI and POI on stack correlation plot
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Pechnikov committed Jun 23, 2024
1 parent a2e9c57 commit 6bad0f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pygmtsar/pygmtsar/Stack_phasediff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()

0 comments on commit 6bad0f5

Please sign in to comment.