biosimulators_utils.viz package#

Subpackages#

Submodules#

biosimulators_utils.viz.data_model module#

Data model for plots

Author:

Jonathan Karr <karr@mssm.edu>

Date:

2020-12-06

Copyright:

2020, Center for Reproducible Biomedical Modeling

License:

MIT

class biosimulators_utils.viz.data_model.VizFormat(value)[source]#

Bases: str, Enum

Format of a report

__format__(format_spec)[source]#

Returns format using actual value type unless __str__ has been overridden.

jpg = 'jpg'[source]#
pdf = 'pdf'[source]#
png = 'png'[source]#
svg = 'svg'[source]#

biosimulators_utils.viz.io module#

Methods for generating SED plots

Author:

Jonathan Karr <karr@mssm.edu>

Date:

2020-12-23

Copyright:

2020, Center for Reproducible Biomedical Modeling

License:

MIT

biosimulators_utils.viz.io.write_plot_2d(plot, data_generator_results, base_path, rel_path, format=VizFormat.pdf, style='seaborn-v0_8-bright')[source]#

Generate a 2D plot

Parameters:
  • plot (Plot2D) – description of plot

  • data_generator_results (DataGeneratorResults) – results of data generators

  • base_path (str) – base path to save plot

  • rel_path (str) – path to save results relative to base_path

  • format (VizFormat, optional) – format

  • style (str, optional) – matplotlib style

biosimulators_utils.viz.io.write_plot_3d(plot, data_generator_results, base_path, rel_path, format=VizFormat.pdf, style='seaborn-v0_8-bright', colormaps=[<matplotlib.colors.ListedColormap object>, <matplotlib.colors.ListedColormap object>, <matplotlib.colors.ListedColormap object>, <matplotlib.colors.ListedColormap object>, <matplotlib.colors.ListedColormap object>])[source]#

Generate a 3D plot

Parameters:
  • plot (Plot3D) – description of plot

  • data_generator_results (DataGeneratorResults) – results of data generators

  • base_path (str) – base path to save plot

  • rel_path (str) – path to save results relative to base_path

  • format (VizFormat, optional) – format

  • style (str, optional) – matplotlib style

  • colormaps (list of matplotlib.colors.LinearSegmentedColormap, optional) – colormaps

biosimulators_utils.viz.utils module#

Utilities for visualizations

Author:

Jonathan Karr <karr@mssm.edu>

Date:

2021-07-22

Copyright:

2021, Center for Reproducible Biomedical Modeling

License:

MIT

biosimulators_utils.viz.utils.cubic_bezier_angle(points, t)[source]#

Get the angle of a point along a cubic bezier curve

Parameters:
  • points (list of list of float) – control points

  • t (float) – position along the curve [0, 1]

Returns:

angle of the curve at point t

Return type:

float

biosimulators_utils.viz.utils.cubic_bezier_point(points, t)[source]#

Get the coordinate of a point along a cubic bezier curve

Parameters:
  • points (list of list of float) – control points

  • t (float) – position along the curve [0, 1]

Returns:

position of the curve at point t

Return type:

tuple of float

biosimulators_utils.viz.warnings module#

Warnings for plots

Author:

Jonathan Karr <karr@mssm.edu>

Date:

2021-01-20

Copyright:

2021, Center for Reproducible Biomedical Modeling

License:

MIT

exception biosimulators_utils.viz.warnings.IllogicalVizWarning[source]#

Bases: BioSimulatorsWarning

Warning that a plot is may be illogical (e.g., has mixed axes or scales)