We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a936399 + 7a8ad8a commit ab44d47Copy full SHA for ab44d47
1 file changed
petab/v1/visualize/plotting.py
@@ -861,9 +861,15 @@ def parse_from_id_list(
861
"""
862
if ids_per_plot is None:
863
# 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()
866
- 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[
+ {
867
+ "dataset": DATASET_ID,
868
+ "observable": OBSERVABLE_ID,
869
+ "simulation": SIMULATION_CONDITION_ID,
870
+ }[group_by]
871
+ ].unique()
872
+ ids_per_plot = [[id_] for id_ in unique_ids_list]
873
874
if group_by == "dataset" and DATASET_ID not in self._data_df:
875
raise ValueError(
0 commit comments