petab.visualize.plot_data_and_simulation¶
-
petab.visualize.
plot_data_and_simulation
(exp_data: Union[str, pandas.core.frame.DataFrame], exp_conditions: Union[str, pandas.core.frame.DataFrame], vis_spec: Optional[Union[str, pandas.core.frame.DataFrame]] = None, sim_data: Optional[Union[str, pandas.core.frame.DataFrame]] = None, dataset_id_list: Optional[List[List[str]]] = None, sim_cond_id_list: Optional[List[List[str]]] = None, sim_cond_num_list: Optional[List[List[int]]] = None, observable_id_list: Optional[List[List[str]]] = None, observable_num_list: Optional[List[List[int]]] = None, plotted_noise: Optional[str] = 'MeanAndSD', subplot_file_path: str = '') → Optional[Union[Dict[str, matplotlib.axes._subplots.AxesSubplot], np.ndarray[plt.Subplot]]]¶ Main function for plotting data and simulations.
What exactly should be plotted is specified in a visualizationSpecification.tsv file.
Also, the data, simulations and conditions have to be defined in a specific format (see “doc/documentation_data_format.md”).
- Parameters
exp_data – measurement DataFrame in the PEtab format or path to the data file.
exp_conditions – condition DataFrame in the PEtab format or path to the condition file.
vis_spec – Visualization specification DataFrame in the PEtab format or path to visualization file.
sim_data – simulation DataFrame in the PEtab format or path to the simulation output data file.
dataset_id_list – A list of lists. Each sublist corresponds to a plot, each subplot contains the datasetIds for this plot. Only to be used if no visualization file was available.
sim_cond_id_list – A list of lists. Each sublist corresponds to a plot, each subplot contains the simulationConditionIds for this plot. Only to be used if no visualization file was available.
sim_cond_num_list – A list of lists. Each sublist corresponds to a plot, each subplot contains the numbers corresponding to the simulationConditionIds for this plot. Only to be used if no visualization file was available.
observable_id_list – A list of lists. Each sublist corresponds to a plot, each subplot contains the observableIds for this plot. Only to be used if no visualization file was available.
observable_num_list – A list of lists. Each sublist corresponds to a plot, each subplot contains the numbers corresponding to the observableIds for this plot. Only to be used if no visualization file was available.
plotted_noise – String indicating how noise should be visualized: [‘MeanAndSD’ (default), ‘MeanAndSEM’, ‘replicate’, ‘provided’]
subplot_file_path – String which is taken as file path to which single subplots are saved. PlotIDs will be taken as file names.
- Returns
ax (Axis object of the created plot.)
None (In case subplots are save to file)