Skip to content

Commit e64d8e5

Browse files
authored
Merge pull request #673 from rjleveque/make_shoreline_noplot
suppress plot made by make_shoreline_xy
2 parents 506bdfc + d1564a2 commit e64d8e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/python/geoclaw/topotools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,13 +1716,15 @@ def make_shoreline_xy(self, sea_level=0):
17161716
x = self.x
17171717
y = self.y
17181718
Z = self.Z
1719+
fig = plt.figure()
17191720
c = plt.contour(x,y,Z,[sea_level])
17201721
# c is the level 0 contour as list of arrays, one for each segement
17211722
# catenate these together separated by array([nan,nan]):
17221723
shoreline_xy = c.allsegs[0][0] # first segment
17231724
for k in range(1,len(c.allsegs[0])):
17241725
shoreline_xy = numpy.vstack((shoreline_xy, \
17251726
numpy.array([numpy.nan,numpy.nan]), c.allsegs[0][k]))
1727+
plt.close(fig)
17261728
return shoreline_xy
17271729

17281730

0 commit comments

Comments
 (0)