:mod:`dfba.plot.plotly` ======================= .. py:module:: dfba.plot.plotly .. autoapi-nested-parse:: Provide functions to plot concentrations and trajectories using plotly. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: dfba.plot.plotly.plot_concentrations dfba.plot.plotly.plot_trajectories .. function:: 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 = '$\\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]$') -> plotly.graph_objects.Figure Plot the concentration results of a dynamic FBA simulation. The resulting plot can be further customized using the plotly backend. :param results: The concentration results of a simulation. :type results: pandas.DataFrame :param metabolites: The names of the metabolites in the data frame (default: all columns except for time and biomass). :type metabolites: list of strings, optional :param biomass: The name of biomass in the results (default "Biomass"). :type biomass: str, optional :param time: The name of the time column in the results (default "time"). :type time: str, optional :param labels: A mapping from columns names to legend labels (default is the same). :type labels: dict, optional :param x_axis_title: The axis title for the horizontal axis (default time). :type x_axis_title: str, optional :param left_y_axis_title: The left vertical axis title (default biomass). :type left_y_axis_title: str, optional :param right_y_axis_title: The right vertical axis title (default metabolite concentration). :type right_y_axis_title: str, optional :returns: 2 y-axes: biomass on the left, (concentration / time) metabolites on the right (concentration / time) x-axis: time :rtype: plotly.graph_objects.Figure .. function:: plot_trajectories(results: pandas.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]$') -> plotly.graph_objects.Figure Plot the flux trajectories of a dynamic FBA simulation. The resulting plot can be further customized using the plotly backend. :param results: The flux results of a simulation. :type results: pandas.DataFrame :param reactions: The names of the reactions in the data frame (default: all columns except for time). :type reactions: list of strings, optional :param time: The name of the time column in the results (default "time"). :type time: str, optional :param labels: A mapping from columns names to legend labels (default is the same). :type labels: dict, optional :param x_axis_title: The axis title for the horizontal axis (default time). :type x_axis_title: str, optional :param y_axis_title: The vertical axis title (default flux). :type y_axis_title: str, optional :returns: y-axis: flux trajectories (concentration / cell mass / time). x-axis: time :rtype: plotly.graph_objects.Figure