Plot¶
The strengths.plot module provides a few convenient plotting functions for visualization.
Those functions internally rely on the Matplotlib package,
which thus needs to be installed.
- strengths.plot.plot_trajectory(output, species, position=None, *, ax=None)¶
Plots the time trajectory of one or more species. It relies on the Matplotlib package.
- Parameters:
output (RDOutput) – simulation output
species (str or array of str.) – labels of the species for which the trajectories should be plotted. if given a label, only one trajectory is plotted. if given an array, trajectories of all the labels are plotted.
position (None, number, tuple or Coord like) – position of the cell from which we want the trajectory. if None, the global trajectory for the whole system is plotted instead.
ax – (optional keyword argument) Matplotlib axis to be used (default = None).
- strengths.plot.plot_sample_state_2D(output, species, sample, axis='auto', axis_position=0, environments=None, xmin=None, xmax=None, units_system=None, *, ax=None)¶
Plots the distribution for the quantity of a species on a plan of the system space. It relies on the Matplotlib package.
- Parameters:
output (RDOutput) – simulation output
spacies – label of the species of which the state should be plotted
sample (int) – index of the sample at chich the state should be taken
axis (str) –
axis along which the state slice should be taken. accepted values are :
”auto” : the axis that seems the most appropriate is used
”x” : the x axis is taken
”y” : the y axis used
”z” : the z axis is used
axis_position (int) – position of the slice along the slice axis
ax – (optional keyword argument) Matplotlib axis to be used (default = None).
- strengths.plot.plot_state_2D(system, species, axis='auto', axis_position=0, *, ax=None)¶
Plots the distribution for the quantity of a species on a plan of the system space. It relies on the Matplotlib package.
- strengths.plot.plot_environments_2D(system, axis='auto', axis_position=0, env_color_dict=None, *, ax=None)¶
Plots the distribution of the reaction diffusion environments on a plan of the system space. env_color_dict allow to define which color should be used to represent each environment. If it is ignored, a gray scale will be used. It relies on the Matplotlib package.
- strengths.plot.plot_chemostats_2D(system, species, axis='auto', axis_position=0, color_no='white', color_yes='black', *, ax=None)¶
Plots the distribution of the chemostats for a given species on a plan of the system space. color_no and color_yes are colors to be used to indicate the absence or prence of chemostats. defaults are “white” and “black”. It relies on the Matplotlib package.