dfba.plot.plotly¶
Provide functions to plot concentrations and trajectories using plotly.
Module Contents¶
Functions¶
plot_concentrations(results: DataFrame, metabolites: Optional[List[str]] = None, biomass: str = ‘Biomass’, time: str = ‘time’, labels: Optional[Dict[str, str]] = None, x_axis_title: str = ‘$\textrm{Time} \left[ \textrm{h} \right]$’, left_y_axis_title: str = ‘$\textrm{Biomass} \left[ \textrm{g} \, \textrm{L}^{-1} \right]$’, right_y_axis_title: str = ‘$\textrm{Metabolites} \left[ \textrm{mmol} \, \textrm{L}^{-1} \right]$’) |
Plot the concentration results of a dynamic FBA simulation. |
plot_trajectories(results: DataFrame, reactions: Optional[List[str]] = None, time: str = ‘time’, labels: Optional[Dict[str, str]] = None, x_axis_title: str = ‘$\textrm{Time} \left[ \textrm{h} \right]$’, y_axis_title: str = ‘$\textrm{Flux} \left[ \textrm{mmol} \, \textrm{g}_{\textrm{DW}}^{-1} \, \textrm{h}^{-1} \right]$’) |
Plot the flux trajectories of a dynamic FBA simulation. |
-
dfba.plot.plotly.plot_concentrations(results: DataFrame, metabolites: Optional[List[str]] = None, biomass: str = 'Biomass', time: str = 'time', labels: Optional[Dict[str, str]] = None, x_axis_title: str = '$\textrm{Time} \left[ \textrm{h} \right]$', left_y_axis_title: str = '$\textrm{Biomass} \left[ \textrm{g} \, \textrm{L}^{-1} \right]$', right_y_axis_title: str = '$\textrm{Metabolites} \left[ \textrm{mmol} \, \textrm{L}^{-1} \right]$') → go.Figure[source]¶ Plot the concentration results of a dynamic FBA simulation.
The resulting plot can be further customized using the plotly backend.
Parameters: - results (pandas.DataFrame) – The concentration results of a simulation.
- metabolites (list of strings, optional) – The names of the metabolites in the data frame (default: all columns except for time and biomass).
- biomass (str, optional) – The name of biomass in the results (default “Biomass”).
- time (str, optional) – The name of the time column in the results (default “time”).
- labels (dict, optional) – A mapping from columns names to legend labels (default is the same).
- x_axis_title (str, optional) – The axis title for the horizontal axis (default time).
- left_y_axis_title (str, optional) – The left vertical axis title (default biomass).
- right_y_axis_title (str, optional) – The right vertical axis title (default metabolite concentration).
Returns: - 2 y-axes: biomass on the left, (concentration / time)
metabolites on the right (concentration / time)
x-axis: time
Return type: plotly.graph_objects.Figure
-
dfba.plot.plotly.plot_trajectories(results: DataFrame, reactions: Optional[List[str]] = None, time: str = 'time', labels: Optional[Dict[str, str]] = None, x_axis_title: str = '$\textrm{Time} \left[ \textrm{h} \right]$', y_axis_title: str = '$\textrm{Flux} \left[ \textrm{mmol} \, \textrm{g}_{\textrm{DW}}^{-1} \, \textrm{h}^{-1} \right]$') → go.Figure[source]¶ Plot the flux trajectories of a dynamic FBA simulation.
The resulting plot can be further customized using the plotly backend.
Parameters: - results (pandas.DataFrame) – The flux results of a simulation.
- reactions (list of strings, optional) – The names of the reactions in the data frame (default: all columns except for time).
- time (str, optional) – The name of the time column in the results (default “time”).
- labels (dict, optional) – A mapping from columns names to legend labels (default is the same).
- x_axis_title (str, optional) – The axis title for the horizontal axis (default time).
- y_axis_title (str, optional) – The vertical axis title (default flux).
Returns: y-axis: flux trajectories (concentration / cell mass / time). x-axis: time
Return type: plotly.graph_objects.Figure