mass.visualization.comparison
Contains function for visually comparing values in various objects.
See the mass.visualization documentation for general information
on mass.visualization functions.
This module contains the following functions for visually comparing a set of values in one object against a similar set of valeus in another object.
Module Contents
Functions
|
Plot values of two objects for comparision. |
|
Get default |
- mass.visualization.comparison.plot_comparison(x, y, compare=None, observable=None, ax=None, legend=None, **kwargs)[source]
Plot values of two objects for comparision.
This function can take two
MassModel,ConcSolution,cobra.Solution, orpandas.Seriesobjects and plot them against one another in a calibration plot.Accepted
kwargsare passed onto variousmatplotlibmethods utilized in the function. See thevisualizationmodule documentation for more detailed information about the possiblekwargs.Notes
If a
pandas.Series, the index must correspond to the identifier of the assoicated object. (e.g. a metabolite identifier forcompare="concentrations", or a reaction identifier forcompare="Keqs")
- Parameters
x (MassModel, ConcSolution, Solution, Series) – The object to access for x-axis values.
y (MassModel, ConcSolution, Solution, Series) – The object to access for y-axis values.
compare (str) –
The values to be compared. Must be one of the following:
"concentrations"forMassModelandConcSolutionobjects."Keqs"forMassModelandConcSolutionobjects."fluxes"forMassModelandcobra.Solutionobjects."kfs"forMassModelobjects.
Not required if both
xandyarepandas.Series.observable (iterable) – An iterable containing string identifiers of
massobjects or the objects themselves corresponding to the object or index where the value is located.ax (matplotlib.axes.Axes, None) – An
Axesinstance to plot the data on. IfNonethen the current axes instance is used.There are three possible input formats for the legend:
An iterable of legend labels as strings.
A
strrepresenting the location of the legend, or anintbetween 0 and 14 (inclusive) corresponding to the legend location.An iterable of the format
(labels, loc)to set both the legend labels and location, wherelabelsandlocfollows the labels specified in 1 and 2.
See the
visualizationdocumentation for more information about legend and valid legend locations.**kwargs –
plot_function
title
xlabel
ylabel
xlim
ylim
grid
grid_color
grid_linestyle
grid_linewidth
prop_cycle
color
marker
markersize
legend_ncol
xy_line
xy_linecolor
xy_linewidth
xy_linestyle
xy_legend
See
visualizationdocumentation for more information on optionalkwargs.
- Returns
ax – The
Axesinstance containing the newly created plot.- Return type