sbmlsim.plot
¶
Submodules¶
Package Contents¶
Classes¶
A figure consists of multiple subplots. |
|
Plot panel. |
|
Base class for plotting objects. |
|
A SubPlot is a locate plot in a figure. |
|
Base class for plotting objects. |
|
Generic enumeration. |
- class sbmlsim.plot.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) –
- fig_dpi = 72¶
- fig_facecolor = white¶
- fig_subplots_wspace = 0.3¶
- fig_subplots_hspace = 0.3¶
- panel_width = 7¶
- panel_height = 5¶
- fig_titlesize = 25¶
- fig_titleweight = bold¶
- axes_titlesize = 20¶
- axes_titleweight = bold¶
- axes_labelsize = 18¶
- axes_labelweight = bold¶
- xtick_labelsize = 15¶
- ytick_labelsize = 15¶
- legend_fontsize = 13¶
- legend_loc = best¶
- _area_interpolation_points = 300¶
- num_subplots(self)¶
Number of existing subplots.
- num_panels(self)¶
Number of available spots for plots.
- set_title(self, title)¶
- create_plots(self, xaxis=None, yaxis=None, legend=True)¶
Template function for creating plots
- property plots(self)¶
- add_plots(self, plots, copy_plots=False)¶
Add plots to figure.
For every plot a subplot is generated.
- Parameters
plots (List[Plot]) –
copy_plots (bool) –
- Return type
None
- static from_plots(sid, plots)¶
Create figure object from list of plots.
- to_dict(self)¶
Convert to dictionary.
- class sbmlsim.plot.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
- __copy__(self)¶
- to_dict(self)¶
Convert to dictionary.
- property experiment(self)¶
- property title(self)¶
- set_title(self, title)¶
- Parameters
title (str) –
- set_xaxis(self, label, unit=None, **kwargs)¶
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)¶
Set axis with all axes attributes.
All argument of Axis are supported.
- Parameters
label (Union[str, Axis]) –
unit (str) –
label_visible –
kwargs –
- Returns
- curve(self, x, y, xerr=None, yerr=None, single_lines=False, dim_reductions=None, **kwargs)¶
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]) –
- add_data(self, xid, yid, yid_sd=None, yid_se=None, count=None, dataset=None, task=None, label='__yid__', single_lines=False, dim_reduction=None, **kwargs)¶
Wrapper around plotting.
- Parameters
xid (str) –
yid (str) –
count (Union[int, str]) –
dataset (str) –
task (str) –
label (str) –
- class sbmlsim.plot.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 AxisScale¶
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- LINEAR = 1¶
- LOG10 = 2¶
- __copy__(self)¶
- __str__(self)¶
Return str(self).
- property scale(self)¶
- to_dict(self)¶
Convert to dictionary.
- class sbmlsim.plot.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) –
- __str__(self)¶
Return str(self).
- class sbmlsim.plot.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) –
- __str__(self)¶
Return str(self).
- static _add_default_style_kwargs(d, dtype)¶
Default plotting styles
- Parameters
d (Dict) –
dtype (str) –
- Return type
Dict
- to_dict(self)¶
Convert to dictionary.
- class sbmlsim.plot.ColorType(color)[source]¶
Bases:
object
- Parameters
color (str) –
- to_dict(self)¶
- __repr__(self)¶
Return repr(self).
- class sbmlsim.plot.MarkerType[source]¶
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- NONE = 1¶
- SQUARE = 2¶
- CIRCLE = 3¶
- DIAMOND = 4¶
- XCROSS = 5¶
- PLUS = 6¶
- STAR = 7¶
- TRIANGLEUP = 8¶
- TRIANGLEDOWN = 9¶
- TRIANGLELEFT = 10¶
- TRIANGLERIGHT = 11¶
- HDASH = 12¶
- VDASH = 13¶