Plotting Utilities

plotting.plotAsciiConcentrationsBar(r, scale=5)[source]

Display the floating species concentrations as an ASCII bar chart.

Parameters:
  • r – roadrunner instance

  • scale – (integer) optional parameter to scale the ascii bar graph

Example

>>> teUtils.plotting.plotAsciiConcentrationsBar (r, scale=20)
plotting.plotAsciiReactionRatesBar(r, scale=5)[source]

Display the reaction rates as an ASCII bar chart.

Parameters:
  • r – roadrunner instance.

  • scale – (integer) optional parameter to scale the ascii bar graph

Example

>>> teUtils.plotting.plotAsciiReactionRatesBar (r, scale=20)
plotting.plotRandSimGrid(r, species=[], pdfExport=None, figsize=(11, 8), maxRange=10, endTime=200, numPoints=500, ngrid=20)[source]

Plots a grid of simulations, each simulation is based on the same model but randomly drawn parameter values.

Parameters:
  • r – roadrunner instance

  • figsize – (tuple of float) optional: width and heigh of plot in inches

  • endtime – (double) optional: time to simulate to

  • numPoints – (double) optional: numberof points to generate for the plot

  • ngrid – (integer) optional: the size of the grid, default is 20 x 20 plots

  • maxRange – (double) optional: upper range for randomly drawn parameter values

  • pdfExport – (string) optional parameter, indicates the filename to export the plot as a pdf file

Example

>>> teUtils.plotting.plotPhasePortraitGrid (r)
plotting.plotPhasePortraitGrid(r, pdfExport=None, figsize=(11, 8), endTime=200, numPoints=500)[source]

Plots a grid of phase portraits of the floating species concentrations.

Parameters:
  • r – roadrunner instance

  • figsize – (tuple of float) optional: width and heigh of plot in inches

  • endtime – (double) optional: time to simulate to

  • numPoints – (double) optional: numberof points to generate for the plot

  • pdfExport – (string) optional parameter, indicates the filename to export the plot as a pdf file

Example

>>> teUtils.plotting.plotPhasePortraitGrid (r)
plotting.plotConcentrationControlHeatMap(r, pdfExport=None, annotations=True, figsize=(13, 7), vmin=-1, vmax=1)[source]

Display the concentation control coefficients as a heat map

Parameters:
  • r – roadrunner instance

  • pdfExport – (string) optional: indicates the filename to export the heat map image to in the form of pdf

  • annotations (boolean) – used to draw values on teh heatmap cells

  • figsize – (tutle of double) optional: sets the size of the plot, eg figsize=(10,5)

  • vmin – (double) optional: set the lower limit for the range

  • vmac – (double) optional: set the upper limit for the range

Example

>>> teUtils.plotting.plotConcentrationControlHeatMap (r, pdfExport='heapmap.pdf')
plotting.plotFluxControlHeatMap(r, pdfExport=None, annotations=True, figsize=(13, 7), vmin=-1, vmax=1)[source]

Display the flux control coefficients as a heat map

Parameters:
  • r – roadrunner instance

  • pdfExport – (string) optional parameter, if present it should indicate the filename to export the heat map image to in the form of pdf

  • annotations – (boolean) used to draw values on teh heatmap cells

  • figsize – (tuple of double) sets the size of the plot, eg figsize=(10,5)

  • vmin – (double) set the lower limit for the range

  • vmax – (double) set the upper limit for the range

Example

>>> teUtils.plotting.plotFluxControlHeatMap (r, pdfExport='heapmap.pdf')
plotting.plotFluxControlBar(r, reactionId, figsize=(13, 7))[source]

Plots a graph bar graph of the flux control coefficients

Parameters:
  • r – roadrunner instance

  • reactionid (string) –

  • figsize – (tuple of float) optional width and heigh of plot in inches

Example

>>> teUtils.plotting.plotFluxControlBar (r, 'J1', figsize=(12,6))
plotting.plotConcentrationControlBar(r, speciesId, figsize=(13, 7))[source]

Plots a graph bar graph of the concentration control coefficients

Parameters:
  • r – roadrunner instance

  • speciesid – (string) speciesId for the concentration control

  • figsize – (tuple of float) optional: width and heigh of plot in inches

Example

>>> teUtils.plotting.plotConcentrationControlBar (r, 'Glucose', figsize=(12,6))
plotting.plotArrayHeatMap(data, pdfExport=None, annotations=True, figsize=(13, 7), vmin=-1, vmax=1)[source]

Display the flux control coefficients as a heat map

Parameters:
  • r – roadrunner instance

  • pdfExport – (string) optional parameter, if present it should indicate the filename to export the heat map image to in the form of pdf

  • annotations – (boolean) used to draw values on teh heatmap cells

  • figsize – (tuple) sets the size of the plot, eg figsize=(10,5)

  • vmin – (double) set the lower limit for the range

  • vmax – (double) set the upper limit for the range

Example

>>> teUtils.plotting.plotFluxControlHeatMap (r, pdfExport='heapmap.pdf')
plotting.plotConcentrationControlIn3D(r, upperLimit=1, lowerLimit=-1, figsize=(10, 8))[source]

Display the concentation control coefficients as a 3D plot

Parameters:
  • r – roadrunner instance

  • upperlimit – (float) optional parameter, sets the lower z axis limit

  • upperlimit – (float) optional parameter, sets the upper z axis limit

  • figsize – (tuble of float) optional: width and heigh of plot in inches

Example

>>> teUtils.plotting.plotConcentrationControlIn3D (r)
plotting.plotFluxControlIn3D(r, upperLimit=1, lowerLimit=-1, figsize=(9, 7))[source]

Display the flux control coefficients as a 3D plot

Parameters:
  • r – roadrunner instance

  • upperlimit – (float) optional parameter, sets the lower z axis limit

  • upperlimit – (float) optional parameter, sets the upper z axis limit

  • figsize – (tuble of float) optional: width and heigh of plot in inches

Example

>>> teUtils.plotting.plotFluxControlIn3D (r)
plotting.plotReactionRates(r, figsize=(12, 6))[source]

Plots a graph bar graph of the reaction rates

Parameters:
  • r – roadrunner instance

  • figsize – (tuple of float) optional: width and heigh of plot in inches

Example

>>> teUtils.plotting.plotReactionRates (r, figsize=(12,6))
plotting.plotFloatingSpecies(r, figsize=(12, 6))[source]

Plots a graph bar graph of the floating species concentrations.

Parameters:
  • r – roadrunner instance

  • figsize – (tuple of float) optional: width and heigh of plot in inches

Example

>>> teUtils.plotting.plotFloatingSpecies (r, figsize=(12,6))
plotting.plotArray(result, loc='upper right', show=True, resetColorCycle=True, xlabel=None, ylabel=None, title=None, xlim=None, ylim=None, xscale='linear', yscale='linear', grid=False, labels=None, **kwargs)[source]

Plot a 2D graph based on an array where the first column is the x-axis

The first column of the array must be the x-axis and remaining columns the y-axis. Note that you can add plotting options as named key values after the array. To add a legend, include the label legend values: te.plotArray (m, labels=[‘Label 1, ‘Label 2’, etc]) Make sure you include as many labels as there are curves to plot! Use show=False to add multiple curves. Use color=’red’ to use the same color for every curve.

Parameters:

r – roadrunner instance

Returns:

Returns a handle to the plotting object.

Example

>>> import numpy as np
>>> result = _np.array([[1,2,3], [7.2,6.5,8.8], [9.8, 6.5, 4.3]])
>>> te.plotArray(result, title="My graph', xlim=((0, 5)))
plotting.testme()[source]

Call this method to try out the methods in this module