Skip to content

Commit

Permalink
fixes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
megies committed Sep 13, 2017
1 parent 751f382 commit 166d73b
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions obspyck/obspyck.py
Original file line number Diff line number Diff line change
Expand Up @@ -1960,23 +1960,16 @@ def drawFocMec(self):
# plot the selected solution
fm = fms[self.focMechCurrent]
np1 = fm.nodal_planes.nodal_plane_1
if hasattr(fm, "_beachball"):
beach_ = fm._beachball
else:
beach_ = beach([np1.strike, np1.dip, np1.rake],
width=plot_width)
fm._beachball = beach_
beach_ = beach([np1.strike, np1.dip, np1.rake],
width=plot_width)
ax.add_collection(beach_)
# plot the alternative solutions
if not hasattr(fm, "_beachball2"):
for fm_ in fms:
_np1 = fm_.nodal_planes.nodal_plane_1
beach_ = beach([_np1.strike, _np1.dip, _np1.rake],
nofill=True, edgecolor='k', linewidth=1.,
alpha=0.3, width=plot_width)
fm_._beachball2 = beach_
for fm_ in fms:
ax.add_collection(fm_._beachball2)
_np1 = fm_.nodal_planes.nodal_plane_1
beach_ = beach([_np1.strike, _np1.dip, _np1.rake],
nofill=True, edgecolor='k', linewidth=1.,
alpha=0.3, width=plot_width)
ax.add_collection(beach_)
text = "Focal Mechanism (%i of %i)" % \
(self.focMechCurrent + 1, len(fms))
text += "\nStrike: %6.2f Dip: %6.2f Rake: %6.2f" % \
Expand Down

0 comments on commit 166d73b

Please sign in to comment.