From ec3ecd04bb287683a98ab4b97a5800228b2e7d38 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Thu, 25 Jun 2015 10:34:15 +0200 Subject: [PATCH] pick colors now depend on the type of phase picked; blueish colors for compressional wave (p) phases and reddish colors for shear wave (s) phases --- pylot/core/util/widgets.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index f7a460e3..b8b8b931 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -511,9 +511,12 @@ class PickDlg(QDialog): # plotting picks ax = self.getPlotWidget().axes ylims = self.getGlobalLimits('y') + phase_col = {'P': ('c', 'c--', 'b-'), + 'S': ('m', 'm--', 'r-')} if self.getPicks(): if phase is not None: picks = self.getPicks()[phase] + colors = phase_col[phase[0].upper()] else: for phase in self.getPicks(): self.drawPicks(phase) @@ -526,10 +529,11 @@ class PickDlg(QDialog): lpp = picks['lpp'] spe = picks['spe'] - ax.fill_between([epp, lpp], ylims[0], ylims[1], alpha=.5, color='c') - ax.plot([mpp - spe, mpp - spe], ylims, 'c--', - [mpp, mpp], ylims, 'b-', - [mpp + spe, mpp + spe], ylims, 'c--') + ax.fill_between([epp, lpp], ylims[0], ylims[1], + alpha=.5, color=colors[0]) + ax.plot([mpp - spe, mpp - spe], ylims, colors[1], + [mpp, mpp], ylims, colors[2], + [mpp + spe, mpp + spe], ylims, colors[1]) def panPress(self, gui_event): ax = self.getPlotWidget().axes