Skip to content

Commit

Permalink
conditional legend on growth rates
Browse files Browse the repository at this point in the history
  • Loading branch information
cdiener committed Sep 12, 2024
1 parent d5af552 commit 7c3f84a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion micom/data/templates/growth.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ <h1 class="title">
selection: "pts",
field: "{{ color }}",
type: "nominal",
legend: null
{% if color == "taxon" %}legend: null{% endif %}
},
value: "lightgrey"
},
Expand Down
5 changes: 3 additions & 2 deletions tests/test_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

def random_groups(res):
"""Create some random groups for samples."""
sids = res.growth_rates.sample_id.unique()
groups = pd.Series(
random.choices(["a", "b"], k=4),
index=res.growth_rates.sample_id.unique(),
random.choices(["a", "b"], k=len(sids)),
index=sids,
name="random",
)
return groups
Expand Down

0 comments on commit 7c3f84a

Please sign in to comment.