dfba.plot.matplotlib
¶
Provide functions to plot concentrations and trajectories using pyplot.
Module Contents¶
Functions¶
|
Plot the concentration results of a dynamic FBA simulation. |
|
Plot the flux trajectories of a dynamic FBA simulation. |
Attributes¶
- dfba.plot.matplotlib.PALETTE = ['#ff7f00', '#32ff00', '#19b2ff', '#654cff', '#e51932', '#000000', '#ffff32', '#ff99bf',...[source]¶
- dfba.plot.matplotlib.plot_concentrations(results: pandas.DataFrame, metabolites: Optional[List[str]] = None, biomass: str = 'Biomass', time: str = 'time', labels: Optional[Dict[str, str]] = None, x_axis_title: str = 'Time $\\left[ \\mathrm{h} \\right]$', left_y_axis_title: str = 'Biomass $\\left[ \\mathrm{g} \\, \\mathrm{L}^{-1} \\right]$', right_y_axis_title: str = 'Metabolites $\\left[ \\mathrm{mmol} \\, \\mathrm{L}^{-1} \\right]$') → None[source]¶
Plot the concentration results of a dynamic FBA simulation.
The resulting plot can be further customized using
matplotlib.pyplot
.- 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).
- dfba.plot.matplotlib.plot_trajectories(results: pandas.DataFrame, reactions: Optional[List[str]] = None, time: str = 'time', labels: Optional[Dict[str, str]] = None, x_axis_title: str = 'Time $\\left[ \\mathrm{h} \\right]$', y_axis_title: str = 'Flux $\\left[ \\mathrm{mmol} \\, \\mathrm{g}_{\\mathrm{DW}}^{-1} \\, \\mathrm{h}^{-1} \\right]$') → None[source]¶
Plot the flux trajectories of a dynamic FBA simulation.
The resulting plot can be further customized using
matplotlib.pyplot
.- 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). x-axis: time