natmix.viz module

natmix.viz.plot_activation_strength(df, activation_col='mean_dff', ylabel=None, color_flies=False, _checks=False, _debug=False)[source]

Shows activation strength of each odor in each panel.

Parameters
  • df (DataFrame) – must have at least the following columns: - ‘panel’: only ‘kiwi’/’control’ rows used - ‘is_pair’: True/False - ‘date’ - ‘fly_num’ - ‘odor1’ - ‘odor2’ - Column specified by activation_col

  • activation_col (str) – the Y-axis variable

  • ylabel (Optional[str]) – label for Y-axis. If not passed, will check whether natmix.viz.activation_col2label has a label for the current activation_col. Otherwise, will just use the column name.

  • color_flies – if True, will color points to indicate fly identity (shared across facets), as well as connecting points from the same fly together

Returns a seaborn FacetGrid with one facet per panel.

Currently only plotting data where is_pair is False.

Return type

FacetGrid

natmix.viz.plot_corr(corr, panel, *, title='')[source]

Shows correlations between representations of panel odors.

Parameters
  • corr (DataArray) – pairwise correlations betweeen all odors in panel, of shape (# odors, # odors)

  • panel (str) – ‘kiwi’/’control’

Return type

Figure