mass.visualization.time_profiles
Contains function for visualizing time profiles of simulation results.
See the mass.visualization
documentation for general information
on mass.visualization
functions.
This module contains the following functions for visualization of
time-dependent solutions returned in MassSolution
s after
simulation of models.
Module Contents
Functions
|
Plot time profiles of solutions in a given |
|
Plot time profiles for an ensemble of class:~.MassSolution objects. |
|
Get default |
- mass.visualization.time_profiles.plot_time_profile(mass_solution, observable=None, ax=None, legend=None, **kwargs)[source]
Plot time profiles of solutions in a given
MassSolution
.Accepted
kwargs
are passed onto variousmatplotlib
methods utilized in the function. See thevisualization
module documentation for more detailed information about the possiblekwargs
.Notes
To prevent any changes to the original
MassSolution
, a copy of theMassSolution
is created and used.
- Parameters
mass_solution (MassSolution) – The
MassSolution
containing the time-dependent solutions to be plotted.observable (iterable, None) – An iterable containing string identifiers of the
mass
objects or the objects themselves that correspond to the keys for the desired solutions in theMassSolution
. IfNone
then all solutions are plotted.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 –
time_vector
plot_function
title
xlabel
ylabel
xlim
ylim
grid
grid_color
grid_linestyle
grid_linewidth
prop_cycle
color
linestyle
linewidth
marker
markersize
legend_ncol
annotate_time_points
annotate_time_points_color
annotate_time_points_marker
annotate_time_points_markersize
annotate_time_points_labels
annotate_time_points_legend
annotate_time_points_zorder
deviation
deviation_zero_centered
deviation_normalization
See
visualization
documentation for more information on optionalkwargs
.
- Returns
ax – The
Axes
instance containing the newly created plot.- Return type
- mass.visualization.time_profiles.plot_ensemble_time_profile(mass_solution_list, observable, ax=None, legend=None, interval_type=None, **kwargs)[source]
Plot time profiles for an ensemble of class:~.MassSolution objects.
The plotted lines represent the mean for the values of a particular solution specified in
observable
.Accepted
kwargs
are passed onto variousmatplotlib
methods utilized in the function. See thevisualization
module documentation for more detailed information about the possiblekwargs
.Notes
To prevent any changes to the original
MassSolution
, copies ofMassSolution
objects are created and used.
- Parameters
mass_solution_list (iterable) – An iterable of
MassSolution
objects containing the time-dependent solutions to be plotted.observable (iterable) – An iterable containing string identifiers of the
mass
objects or the objects themselves that correspond to the keys for the desired solutions in theMassSolution
.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.The type of interval to display with the plotted mean of the solution. Can be one of the following:
"range"
: Interval shading occurs from the minimum to the maximum value for each time point."CI="
: Interval shading occurs for a confidence interval. (e.g. confidence interval of 95% is specified as"CI=95.0"
.)None
to prevent interval shading from occurring.
Default is
None
**kwargs –
time_vector
plot_function
title
xlabel
ylabel
xlim
ylim
grid
grid_color
grid_linestyle
grid_linewidth
prop_cycle
color
linestyle
linewidth
marker
markersize
legend_ncol
annotate_time_points
annotate_time_points_color
annotate_time_points_marker
annotate_time_points_markersize
annotate_time_points_labels
annotate_time_points_legend
deviation
deviation_zero_centered
deviation_normalization
mean_line_alpha
interval_fill_alpha
interval_border_alpha
CI_distribution
See
visualization
documentation for more information on optionalkwargs
.
- Returns
ax – The
Axes
instance containing the newly created plot.- Return type