Plotting¶
Visualisation functions for inspecting model inputs and outputs.
- bayesian_listener.plotting.plot_cues(bl, title='', fig=None, ax=None, clim=None, elev_min=None)[source]¶
Plot spectral cues on the median plane.
- Parameters:
bl (
BayesianListener) – Listener instance withtargetalready set.title (str, default='') – String appended to the default subplot title.
fig (
matplotlib.figure.Figureor None, default=None) – Existing figure to plot on.Nonecreates a fresh figure.ax (
matplotlib.axes.Axesor None, default=None) – Existing axes to plot on.Nonecreates fresh axes insidefig.clim (tuple of float or None, default=None) –
(vmin, vmax)for the colour scale in dB.Noneuses(amps.min(), amps.max()).elev_min (float or None, default=None) – Drop directions with elevation below this threshold (degrees).
Nonekeeps all directions on the median plane.
- Returns:
fig (
matplotlib.figure.Figure)ax (
matplotlib.axes.Axes)
- Raises:
ValueError – If
targetisNone.
- bayesian_listener.plotting.plot_post(bl, posterior, estimations)[source]¶
Plot the posterior distribution on the sphere with response overlay.
- Parameters:
bl (
BayesianListener) – Listener instance withtemplatealready set.posterior (
numpy.ndarray) – Log-posterior of shape(n_templates,), e.g. one slice ofinferoutput withstore_posterior=True.estimations (
pyfar.Coordinatesor None) – Optional pointing-response coordinate (single direction). IfNone, only the posterior is drawn.
- Returns:
ax – 3-D axes with the posterior scatter and overlay arrows.
- Return type: