Skip to content

Commit

Permalink
corrected behavior where plots would appear in cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
kip-hart committed May 14, 2021
1 parent 56311e7 commit f111260
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/microstructpy/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,9 @@ def run(phases, domain, verbose=False, restart=True, directory='.',
if plot_files and verbose:
print('Plotting seeds.')

plot_seeds(seeds, phases, domain, plot_files, plot_axes, color_by,
colormap, **seeds_kwargs)
if plot_files:
plot_seeds(seeds, phases, domain, plot_files, plot_axes, color_by,
colormap, **seeds_kwargs)

# ----------------------------------------------------------------------- #
# Create Polygon Mesh #
Expand Down Expand Up @@ -483,8 +484,9 @@ def run(phases, domain, verbose=False, restart=True, directory='.',
if plot_files and verbose:
print('Plotting polygon mesh.')

plot_poly(pmesh, phases, plot_files, plot_axes, color_by, colormap,
**poly_kwargs)
if plot_files:
plot_poly(pmesh, phases, plot_files, plot_axes, color_by, colormap,
**poly_kwargs)

# ----------------------------------------------------------------------- #
# Create Triangular Mesh #
Expand Down Expand Up @@ -540,8 +542,9 @@ def run(phases, domain, verbose=False, restart=True, directory='.',
if plot_files and verbose:
print('Plotting triangular mesh.')

plot_tri(tmesh, phases, seeds, pmesh, plot_files, plot_axes, color_by,
colormap, **tri_kwargs)
if plot_files:
plot_tri(tmesh, phases, seeds, pmesh, plot_files, plot_axes, color_by,
colormap, **tri_kwargs)

# ----------------------------------------------------------------------- #
# Perform Verification #
Expand Down Expand Up @@ -659,6 +662,7 @@ def plot_seeds(seeds, phases, domain, plot_files=[], plot_axes=True,
:meth:`.SeedList.plot`.
"""
print('plot files seeds', plot_files)
if not plot_files:
plot_files = ['seeds.png']

Expand Down

0 comments on commit f111260

Please sign in to comment.