uravu.plotting

These are plotting functions that take either Relationship or Distribution class objects.

The aim is to produce publication quality plots. However, we recognise that taste exists, and ours may be different from yours. The colorscheme in this work was chosen to be colorblind friendly.

uravu.plotting.plot_corner(relationship, figsize=(8, 8))[source]

Plot the corner (named for the Python package) plot between the relationships variables.

Parameters:
  • relationship (uravu.relationship.Relationship) – The relationship containing the distributions to be plotted.
  • fig_size (tuple, optional) – horizontal and veritcal size for figure (in inches). Default is (10, 6).
Returns:

Containing:
  • matplotlib.figure.Figure: The figure with new plots.
  • matplotlib.axes.Axes: The axes with new plots.

Return type:

tuple

uravu.plotting.plot_distribution(distro, axes=None, figsize=(5, 3))[source]

Plot the probability density function for a distribution.

Parameters:
  • ( (distro) – py:class`uravu.distriobution.Distribution`): The distribution to be plotted.
  • axes (matplotlib.axes.Axes, optional) – Axes to which the plot should be added. If None given new axes will be created. Default is None.
  • fig_size (tuple) – Horizontal and veritcal size for figure (in inches). Default is (10, 6).
Returns:

The axes with new plots.

Return type:

(matplotlib.axes.Axes)

uravu.plotting.plot_relationship(relationship, axes=None, figsize=(10, 6))[source]

Plot the relationship. Additional plots will be included on this if posterior sampling has been used to find distributions.

Parameters:
  • relationship (uravu.relationship.Relationship) – The relationship to be plotted.
  • axes (matplotlib.axes.Axes, optional) – Axes to which the plot should be added. If None given new axes will be created. Default is None.
  • fig_size (tuple, optional) – horizontal and veritcal size for figure (in inches). Default is (10, 6).
Returns:

The axes with new plots.

Return type:

(matplotlib.axes.Axes)