Skip to content

Plot without vis spec without ids_per_plot #386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions petab/v1/visualize/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,15 @@ def parse_from_id_list(
"""
if ids_per_plot is None:
# this is the default case. If no grouping is specified,
# all observables are plotted. One observable per plot.
unique_obs_list = self._data_df[OBSERVABLE_ID].unique()
ids_per_plot = [[obs_id] for obs_id in unique_obs_list]
# each group_by category will be plotted on a separate plot
unique_ids_list = self._data_df[
{
"dataset": DATASET_ID,
"observable": OBSERVABLE_ID,
"simulation": SIMULATION_CONDITION_ID,
}[group_by]
].unique()
ids_per_plot = [[id_] for id_ in unique_ids_list]

if group_by == "dataset" and DATASET_ID not in self._data_df:
raise ValueError(
Expand Down