From 4077ec207cc9ca469fd3e551f617b2eb2db377a1 Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Tue, 6 Jun 2017 13:49:40 +0200 Subject: [PATCH] [bugfix] contourf plot not shown in station map. min() max() was not working when nan in list --- pylot/RELEASE-VERSION | 2 +- pylot/core/util/map_projection.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION index 90f0e370..dfe35322 100644 --- a/pylot/RELEASE-VERSION +++ b/pylot/RELEASE-VERSION @@ -1 +1 @@ -530a-dirty +86c7-dirty diff --git a/pylot/core/util/map_projection.py b/pylot/core/util/map_projection.py index d6f3b96f..5a562c6c 100644 --- a/pylot/core/util/map_projection.py +++ b/pylot/core/util/map_projection.py @@ -51,7 +51,7 @@ class map_projection(QtGui.QWidget): picks=self._parent.get_current_event().getPick(station), autopicks=self._parent.get_current_event().getAutopick(station)) except Exception as e: - message = 'Could not generate Plot for station {st}.\n{er}'.format(st=station, er=e) + message = 'Could not generate Plot for station {st}.\n {er}'.format(st=station, er=e) self._warn(message) print(message, e) return @@ -234,9 +234,9 @@ class map_projection(QtGui.QWidget): self.picks_no_nan, (self.latgrid, self.longrid), method='linear') ################## def draw_contour_filled(self, nlevel='50'): - levels = np.linspace(min(self.picks_rel), max(self.picks_rel), nlevel) + levels = np.linspace(min(self.picks_no_nan), max(self.picks_no_nan), nlevel) self.contourf = self.basemap.contourf(self.longrid, self.latgrid, self.picksgrid_no_nan, - levels, latlon=True, zorder=9) + levels, latlon=True, zorder=9, alpha=0.5) def scatter_all_stations(self): self.sc = self.basemap.scatter(self.lon, self.lat, s=50, facecolor='none', latlon=True,