Skip to content

Commit 166d73b

Browse files
committed
fixes #12
1 parent 751f382 commit 166d73b

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

obspyck/obspyck.py

+7-14
Original file line numberDiff line numberDiff line change
@@ -1960,23 +1960,16 @@ def drawFocMec(self):
19601960
# plot the selected solution
19611961
fm = fms[self.focMechCurrent]
19621962
np1 = fm.nodal_planes.nodal_plane_1
1963-
if hasattr(fm, "_beachball"):
1964-
beach_ = fm._beachball
1965-
else:
1966-
beach_ = beach([np1.strike, np1.dip, np1.rake],
1967-
width=plot_width)
1968-
fm._beachball = beach_
1963+
beach_ = beach([np1.strike, np1.dip, np1.rake],
1964+
width=plot_width)
19691965
ax.add_collection(beach_)
19701966
# plot the alternative solutions
1971-
if not hasattr(fm, "_beachball2"):
1972-
for fm_ in fms:
1973-
_np1 = fm_.nodal_planes.nodal_plane_1
1974-
beach_ = beach([_np1.strike, _np1.dip, _np1.rake],
1975-
nofill=True, edgecolor='k', linewidth=1.,
1976-
alpha=0.3, width=plot_width)
1977-
fm_._beachball2 = beach_
19781967
for fm_ in fms:
1979-
ax.add_collection(fm_._beachball2)
1968+
_np1 = fm_.nodal_planes.nodal_plane_1
1969+
beach_ = beach([_np1.strike, _np1.dip, _np1.rake],
1970+
nofill=True, edgecolor='k', linewidth=1.,
1971+
alpha=0.3, width=plot_width)
1972+
ax.add_collection(beach_)
19801973
text = "Focal Mechanism (%i of %i)" % \
19811974
(self.focMechCurrent + 1, len(fms))
19821975
text += "\nStrike: %6.2f Dip: %6.2f Rake: %6.2f" % \

0 commit comments

Comments
 (0)