lib5c.plotters.distribution module¶
Module for plotting counts distributions.
-
lib5c.plotters.distribution.
plot_global_distributions
(counts_superdict, logged=True, drop_zeros=False, shade=True, labels=None, levels=None, colors=None, hue_order=None, **kwargs)[source]¶ Plots overlayed global distributions for many replicates from a counts superdict.
Parameters: - counts_superdict (counts_superdict) – The data to plot distributions of.
- logged (bool) – Pass True to log the data before plotting.
- drop_zeros (bool) – Pass True to drop zeros from the distributions.
- shade (bool) – Pass True to fill in the area under the distribution curves.
- labels (dict or None) – Pass a dict mapping the keys of counts_superdict to labels for plotting, or pass None to use the keys of counts_superdict as the labels.
- levels (dict or None) – Pass a dict mapping labels to levels to color-code the replicates by level. Pass None to give each replicate its own level.
- colors (dict or None) – Pass a dict mapping levels to matplotlib colors to decide what color to plot each level with. Pass None to automatically choose colors.
- hue_order (list of str or None) – Pass a list of the level names to determine their order in the legend.
- kwargs (kwargs) – Typical plotter kwargs.
Returns: The axis plotted on.
Return type: pyplot axis
-
lib5c.plotters.distribution.
plot_regional_distribtions
(regional_counts_superdict, logged=True, drop_zeros=False, shade=True, labels=None, levels=None, colors=None, hue_order=None, **kwargs)[source]¶ Plots overlayed distributions for many replicates from a regional counts superdict.
Parameters: - regional_counts_superdict (counts_superdict) – The data to plot distributions of.
- logged (bool) – Pass True to log the data before plotting.
- drop_zeros (bool) – Pass True to drop zeros from the distributions.
- shade (bool) – Pass True to fill in the area under the distribution curves.
- labels (dict or None) – Pass a dict mapping the keys of counts_superdict to labels for plotting, or pass None to use the keys of counts_superdict as the labels.
- levels (dict or None) – Pass a dict mapping labels to levels to color-code the replicates by level. Pass None to give each replicate its own level.
- colors (dict or None) – Pass a dict mapping levels to matplotlib colors to decide what color to plot each level with. Pass None to automatically choose colors.
- hue_order (list of str or None) – Pass a list of the level names to determine their order in the legend.
- kwargs (kwargs) – Typical plotter kwargs.
Returns: The axis plotted on.
Return type: pyplot axis
-
lib5c.plotters.distribution.
plot_regional_distribtions_parallel
(regional_counts_superdict, logged=True, drop_zeros=False, shade=True, labels=None, levels=None, colors=None, hue_order=None, **kwargs)¶ Plots overlayed distributions for many replicates from a regional counts superdict.
Parameters: - regional_counts_superdict (counts_superdict) – The data to plot distributions of.
- logged (bool) – Pass True to log the data before plotting.
- drop_zeros (bool) – Pass True to drop zeros from the distributions.
- shade (bool) – Pass True to fill in the area under the distribution curves.
- labels (dict or None) – Pass a dict mapping the keys of counts_superdict to labels for plotting, or pass None to use the keys of counts_superdict as the labels.
- levels (dict or None) – Pass a dict mapping labels to levels to color-code the replicates by level. Pass None to give each replicate its own level.
- colors (dict or None) – Pass a dict mapping levels to matplotlib colors to decide what color to plot each level with. Pass None to automatically choose colors.
- hue_order (list of str or None) – Pass a list of the level names to determine their order in the legend.
- kwargs (kwargs) – Typical plotter kwargs.
Returns: The axis plotted on.
Return type: pyplot axis