Skip to content

Commit

Permalink
update to colors
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Aug 1, 2024
1 parent ce98e60 commit 16e2f15
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bio_check/verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ def visualize(

# plot data params
t = np.linspace(output_start, output_end, num_points + 1) # TODO: extract this dynamically.
simulator_colors = generate_color_gradient(simulators)

simulator_hue = hue.lower() == 'simulators'
hue_group = simulators if simulator_hue else species_names
line_colors = generate_color_gradient(species_names)

# TODO: extract simulator names dynamically as well.

Expand All @@ -230,7 +233,8 @@ def visualize(
if output_data:
# create one plot in each column mapped to each individual simulator output (for clarity :) )
simulator_output = output_data[simulator_name]
sns.lineplot(ax=ax, color=simulator_colors[j], x=t, y=simulator_output, label=f"{simulator_name}")
color_index = j if simulator_hue else i
sns.lineplot(ax=ax, color=line_colors[color_index], x=t, y=simulator_output, label=f"{simulator_name}")

# set row title
ax.set_title(f"{species_name} simulation outputs for {simulator_name}")
Expand Down

0 comments on commit 16e2f15

Please sign in to comment.