vivarium.plots.colonies module¶
Colony Plotting Tools¶
This module contains tools to help you plot colony data.
-
vivarium.plots.colonies.
AREA_PATH
= ('surface_area',)¶ Key for surface area in path timeseries
-
vivarium.plots.colonies.
AXIS_RATIO_PATH
= '(Major Axis) / (Minor Axis)'¶ Key to which the ratio of major axis to minor axis is written in the path timeseries
-
vivarium.plots.colonies.
CIRCUMFERENCE_AREA_RATIO_PATH
= 'circumference / surface_area'¶ Key to which the cirumference-to-area ratio will be written in the path timeseries
-
vivarium.plots.colonies.
CIRCUMFERENCE_PATH
= ('circumference',)¶ Key for circumference in path timeseries
-
vivarium.plots.colonies.
MAJOR_AXIS_PATH
= ('major_axis',)¶ Key for major axis in path timeseries
-
vivarium.plots.colonies.
MINOR_AXIS_PATH
= ('minor_axis',)¶ Key for minor axis in path timeseries
-
vivarium.plots.colonies.
NUM_COLONIES_PATH
= 'Number of Colonies'¶ Key to which the number of colonies is written in the path timeseries
-
vivarium.plots.colonies.
plot_colony_metrics
(path_ts, title_size=16, tick_label_size=12, max_cols=5)[source]¶ Plot colony metrics over time.
Metric mean is plotted with SEM error bands.
- Parameters
path_ts (dict) – Path timeseries of the data to plot. Each item in the dictionary should have as its key the path and as its value a list of values for each timepoint. Each value should be a list of metric values, one entry per colony. The dictionary should have one additional key,
time
, whose value is a list of times for each timepoint.title_size (int) – Font size for the title of each plot
tick_label_size (int) – Font size for each plot’s axis tick labels.
max_cols (int) – The maximum number of columns. We add columns until we hit this limit, and only then do we add rows.
- Returns
The plot as a Figure object.
- Return type
-
vivarium.plots.colonies.
plot_metric_across_experiments
(path_ts_dict, path, title=None, xlabel='time (s)', ylabel=None, title_size=16, tick_label_size=12)[source]¶ Overlay plots of a single metric from different experiments.
- Parameters
path_ts_dict (dict) – Map from the string to use as the label for the experiment in the legend to that experiment’s path timeseries.
path (tuple) – Path to plot. Should be a key in each value of
path_ts_dict
.title (str) – Plot title. If None, no title is set.
xlabel (str) – X-axis label. If None, no label is set.
ylabel (str) – Y-axis label. If None, no label is set.
title_size (float) – Font size for plot and axis titles.
tick_label_size (float) – Font size for tick labels.
- Returns
The figure with the plot.