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.Series
objects and plot them against one another in a calibration plot.Accepted
kwargs
are passed onto variousmatplotlib
methods utilized in the function. See thevisualization
module 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"
forMassModel
andConcSolution
objects."Keqs"
forMassModel
andConcSolution
objects."fluxes"
forMassModel
andcobra.Solution
objects."kfs"
forMassModel
objects.
Not required if both
x
andy
arepandas.Series
.observable (iterable) – An iterable containing string identifiers of
mass
objects or the objects themselves corresponding to the object or index where the value is located.ax (matplotlib.axes.Axes, None) – An
Axes
instance to plot the data on. IfNone
then the current axes instance is used.There are three possible input formats for the legend:
An iterable of legend labels as strings.
A
str
representing the location of the legend, or anint
between 0 and 14 (inclusive) corresponding to the legend location.An iterable of the format
(labels, loc)
to set both the legend labels and location, wherelabels
andloc
follows the labels specified in 1 and 2.
See the
visualization
documentation 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
visualization
documentation for more information on optionalkwargs
.
- Returns
ax – The
Axes
instance containing the newly created plot.- Return type