Skip to content

Commit

Permalink
plotting.ffi: 3d_slip_distribution added perspective to plot name
Browse files Browse the repository at this point in the history
  • Loading branch information
hvasbath committed Oct 16, 2023
1 parent 2332460 commit ffaeb70
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions beat/plotting/ffi.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,14 +906,16 @@ def draw_3d_slip_distribution(problem, po):
else:
slip_label = "slip"

outpath = os.path.join(
perspective_outstr = perspective.replace("/", "_")
basepath = os.path.join(
problem.outfolder,
po.figure_dir,
"3d_%s_distribution_%i_%s_%i.%s"
% (slip_label, po.load_stage, llk_str, po.nensemble, po.outformat),
"3d_%s_distribution_%i_%s_%i_%s"
% (slip_label, po.load_stage, llk_str,
po.nensemble, perspective_outstr),
)

if plot_exists(outpath, po.outformat, po.force):
if plot_exists(basepath, po.outformat, po.force):
return

if mode == ffi_mode_str:
Expand All @@ -934,6 +936,7 @@ def draw_3d_slip_distribution(problem, po):
source_idxs=source_idxs,
)

outpath = f"{basepath}.{po.outformat}"
logger.info("saving figure to %s" % outpath)
gmt.save(outpath, resolution=300, size=10)
elif mode == bem_mode_str:
Expand All @@ -952,7 +955,7 @@ def draw_3d_slip_distribution(problem, po):
perspective=perspective,
debug=False,
)
save_figs([fig], outpath, po.outformat, po.dpi)
save_figs([fig], basepath, po.outformat, po.dpi)


def slip_distribution_3d_gmt(
Expand Down

0 comments on commit ffaeb70

Please sign in to comment.