Skip to content

Commit 86f6fb3

Browse files
committed
If not providing "ids_per_plot" it automatically assumes that "groupy_by='observable'". This should be fixed by creating the ids_per_plot based on the selected groupy by.
1 parent 0e90fd9 commit 86f6fb3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

petab/v1/visualize/plotting.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -861,8 +861,14 @@ def parse_from_id_list(
861861
"""
862862
if ids_per_plot is None:
863863
# this is the default case. If no grouping is specified,
864-
# all observables are plotted. One observable per plot.
865-
unique_obs_list = self._data_df[OBSERVABLE_ID].unique()
864+
# each group_by category will be plotted on a separate plot
865+
unique_obs_list = self._data_df[
866+
{
867+
"dataset": DATASET_ID,
868+
"observable": OBSERVABLE_ID,
869+
"simulation": SIMULATION_CONDITION_ID,
870+
}[group_by]
871+
].unique()
866872
ids_per_plot = [[obs_id] for obs_id in unique_obs_list]
867873

868874
if group_by == "dataset" and DATASET_ID not in self._data_df:

0 commit comments

Comments
 (0)