Skip to content

Commit

Permalink
Enable --interactive flag
Browse files Browse the repository at this point in the history
  • Loading branch information
tjstruck committed Jul 16, 2024
1 parent 963d7df commit fcceaf1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
8 changes: 4 additions & 4 deletions dadi_cli/Plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def plot_single_sfs(
dadi.Plotting.plot_1d_fs(fs, show=show)
if len(fs.sample_sizes) == 2:
fig = plt.figure(219033)
dadi.Plotting.plot_single_2d_sfs(fs, vmin=vmin)#, show=show)
dadi.Plotting.plot_single_2d_sfs(fs, vmin=vmin, show=show)
if len(fs.sample_sizes) == 3:
try:
fig = plt.figure(219033, figsize=(10,4))
Expand Down Expand Up @@ -297,22 +297,22 @@ def plot_fitted_dfe(
projections = ns
fs = fs.project(projections)
model = model.project(projections)
dadi.Plotting.plot_1d_comp_Poisson(model, fs)
dadi.Plotting.plot_1d_comp_Poisson(model, fs, show=show)
if len(ns) == 2:
if projections == None:
projections = ns
fs = fs.project(projections)
model = model.project(projections)
dadi.Plotting.plot_2d_comp_Poisson(
model, fs, vmin=vmin, resid_range=resid_range
model, fs, vmin=vmin, resid_range=resid_range, show=show
)
if len(ns) == 3:
if projections == None:
projections = ns
fs = fs.project(projections)
model = model.project(projections)
dadi.Plotting.plot_3d_comp_Poisson(
model, fs, vmin=vmin, resid_range=resid_range
model, fs, vmin=vmin, resid_range=resid_range, show=show
)
if len(ns) > 3:
raise ValueError("dadi-cli does not support comparing fs and model with more than three populations")
Expand Down
7 changes: 0 additions & 7 deletions dadi_cli/parsers/plot_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,4 @@ def add_plot_parsers(subparsers: argparse.ArgumentParser) -> None:
required=False,
help="Display plots in matplotlib window.",
)
parser.add_argument(
"--show",
default=False,
action="store_true",
required=False,
help="Display plots in matplotlib window.",
)
parser.set_defaults(runner=_run_plot)

0 comments on commit fcceaf1

Please sign in to comment.