sbmlsim.plot.plotting
¶
Base classes for storing plotting information.
The general workflow of generating plotting information is the following.
- Within simulation experiments abstract plotting information is stored.
i.e., how from the data plots can be generated.
Module Contents¶
Classes¶
Base class for plotting objects. |
|
Generic enumeration. |
|
Generic enumeration. |
|
Generic enumeration. |
|
Base class for plotting objects. |
|
Base class for plotting objects. |
|
Base class for plotting objects. |
|
Base class for plotting objects. |
|
Plot panel. |
|
A SubPlot is a locate plot in a figure. |
|
A figure consists of multiple subplots. |
Attributes¶
- sbmlsim.plot.plotting.DEFAULT_COLORS = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f',...[source]¶
- class sbmlsim.plot.plotting.BasePlotObject(sid, name)[source]¶
Bases:
object
Base class for plotting objects.
- Parameters
sid (str) –
name (str) –
- class sbmlsim.plot.plotting.LineType[source]¶
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- class sbmlsim.plot.plotting.MarkerType[source]¶
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- class sbmlsim.plot.plotting.CurveType[source]¶
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- class sbmlsim.plot.plotting.Style(sid=None, name=None, base_style=None, line=None, marker=None, fill=None)[source]¶
Bases:
BasePlotObject
Base class for plotting objects.
- Parameters
- class sbmlsim.plot.plotting.Axis(label=None, unit=None, name=None, scale=AxisScale.LINEAR, min=None, max=None, grid=False, label_visible=True, ticks_visible=True)[source]¶
Bases:
BasePlotObject
Base class for plotting objects.
- Parameters
label (str) –
unit (str) –
name (str) –
scale (AxisScale) –
min (float) –
max (float) –
grid (bool) –
- class sbmlsim.plot.plotting.AbstractCurve(sid, name, x, order, style, yaxis)[source]¶
Bases:
BasePlotObject
Base class for plotting objects.
- Parameters
sid (str) –
name (str) –
x (sbmlsim.data.Data) –
order (int) –
style (Style) –
yaxis (Axis) –
- class sbmlsim.plot.plotting.Curve(x, y, xerr=None, yerr=None, single_lines=False, dim_reductions=None, order=None, style=None, yaxis=None, **kwargs)[source]¶
Bases:
AbstractCurve
Base class for plotting objects.
- Parameters
x (sbmlsim.data.Data) –
y (sbmlsim.data.Data) –
xerr (sbmlsim.data.Data) –
yerr (sbmlsim.data.Data) –
single_lines (bool) –
dim_reductions (List[str]) –
style (Style) –
- class sbmlsim.plot.plotting.Plot(sid, name=None, legend=False, xaxis=None, yaxis=None, curves=None, facecolor=Style.parse_color('white'), title_visible=True)[source]¶
Bases:
BasePlotObject
Plot panel.
A plot is the basic element of a plot. This corresponds to a single panel or axes combination in a plot. Multiple plots create a figure.
- Parameters
- set_xaxis(self, label, unit=None, **kwargs)[source]¶
Set axis with all axes attributes.
All argument of Axis are supported.
- Parameters
label (Union[str, Axis]) –
unit (str) –
label_visible –
kwargs –
- Returns
- set_yaxis(self, label, unit=None, **kwargs)[source]¶
Set axis with all axes attributes.
All argument of Axis are supported.
- Parameters
label (Union[str, Axis]) –
unit (str) –
label_visible –
kwargs –
- Returns
- add_curve(self, curve)[source]¶
Curves are added via the helper function.
- Parameters
curve (Curve) –
- curve(self, x, y, xerr=None, yerr=None, single_lines=False, dim_reductions=None, **kwargs)[source]¶
Adds curve to the plot.
Data can be high-dimensional data from a scan. Additional settings are required which allow to define how things are plotted. E.g. over which dimensions should an error be calculated and which dimensions should be plotted individually.
- Parameters
x (sbmlsim.data.Data) –
y (sbmlsim.data.Data) –
xerr (sbmlsim.data.Data) –
yerr (sbmlsim.data.Data) –
single_lines (bool) –
dim_reductions (List[str]) –
- class sbmlsim.plot.plotting.SubPlot(plot, row=None, col=None, row_span=1, col_span=1)[source]¶
Bases:
BasePlotObject
A SubPlot is a locate plot in a figure.
- Parameters
plot (Plot) –
row (int) –
col (int) –
row_span (int) –
col_span (int) –
- class sbmlsim.plot.plotting.Figure(experiment, sid, name=None, subplots=None, height=None, width=None, num_rows=1, num_cols=1)[source]¶
Bases:
BasePlotObject
A figure consists of multiple subplots.
A reference to the experiment is required, so the plot can resolve the datasets and the simulations.
- Parameters
sid (str) –
name (str) –
subplots (List[SubPlot]) –
height (float) –
width (float) –
num_rows (int) –
num_cols (int) –
- create_plots(self, xaxis=None, yaxis=None, legend=True)[source]¶
Template function for creating plots
- add_plots(self, plots, copy_plots=False)[source]¶
Add plots to figure.
For every plot a subplot is generated.
- Parameters
plots (List[Plot]) –
copy_plots (bool) –
- Return type
None