Skip to content

Commit

Permalink
fix perturbation plots
Browse files Browse the repository at this point in the history
  • Loading branch information
gabora committed Jun 21, 2024
1 parent 2411e58 commit 686b7ec
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions corneto/methods/signal/cellnopt_ilp.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,11 @@ def plot_fitness(G, exp_list, P, measured_only=False, **kwargs):

# depending on the flag measured_only, we can plot only the measured nodes or all nodes
if measured_only:
fig, axs = plt.subplots(N_exps - 1, len(output_names)+1, squeeze=False, **kwargs)
fig, axs = plt.subplots(
N_exps - 1, len(output_names) + 1, squeeze=False, **kwargs
)
else:
fig, axs = plt.subplots(N_exps - 1, N_nodes+1, squeeze=False, **kwargs)
fig, axs = plt.subplots(N_exps - 1, N_nodes + 1, squeeze=False, **kwargs)

fig.tight_layout(pad=0.0)

Expand Down Expand Up @@ -494,8 +496,8 @@ def plot_fitness(G, exp_list, P, measured_only=False, **kwargs):
color=perturbation_colors,
)
if iexp == N_exps - 1:
axs[iexp - 1, len(output_vars)].set_xticks(range(len(perturbation_vars)))
axs[iexp - 1, len(output_vars)].set_xticklabels(
axs[iexp - 1, plot_location)].set_xticks(range(len(perturbation_vars)))
axs[iexp - 1, plot_location].set_xticklabels(
perturbation_vars, rotation=45
)
else:
Expand All @@ -510,7 +512,6 @@ def plot_fitness(G, exp_list, P, measured_only=False, **kwargs):
plt.show()



def collect_field_into_matrix(experiments, field_name="input"):
"""Collects the field_name values into matrix.
Expand Down

0 comments on commit 686b7ec

Please sign in to comment.