sequince.plot
=============

.. py:module:: sequince.plot

.. autoapi-nested-parse::

   Plotting utilities for sequince.



Functions
---------

.. autoapisummary::

   sequince.plot.plot_chains
   sequince.plot.plot_corner


Module Contents
---------------

.. py:function:: plot_chains(chains, n_chains = None, filename = None, parameter_labels = None, parameter_inds = None, split_indices = None, split_kwargs = None, **kwargs)

   Plot MCMC chains.

   :param chains: The MCMC chains to plot, of shape (n_steps, n_chains, n_params).
   :type chains: Array
   :param n_chains: The number of chains to plot. If None, all chains are plotted.
   :type n_chains: int, optional
   :param split_indices: Indices at which a new mutation-chain segment starts. A vertical line
                         is drawn between the samples on either side of each split.
   :type split_indices: sequence of int, optional
   :param split_kwargs: Keyword arguments for the vertical split lines.
   :type split_kwargs: dict, optional
   :param filename: If provided, the plot will be saved to this filename. If None, the plot will be returned as a matplotlib figure.
   :type filename: str | Path, optional
   :param \*\*kwargs: Additional keyword arguments to pass to the plot function.
   :type \*\*kwargs: additional keyword arguments


.. py:function:: plot_corner(particles, weights = None, parameter_inds = None, parameter_labels = None, include_weights = True, filename = None, **kwargs)

   Plot a corner plot of the particles.

   :param particles: The particles to plot, of shape (n_particles, n_dimensions).
   :type particles: Array
   :param weights: The weights of the particles, of shape (n_particles,). If None, uniform weights are assumed.
   :type weights: Array, optional
   :param parameter_inds: Indices of the parameters to plot. If None, all parameters are plotted.
   :type parameter_inds: Sequence[int], optional
   :param parameter_labels: Labels for the parameters. If None, default labels are used.
   :type parameter_labels: Sequence[str], optional
   :param include_weights: Whether to include weights in the corner plot. Default is True.
   :type include_weights: bool, optional
   :param filename: If provided, the plot will be saved to this filename. If None, the plot will be returned as a matplotlib figure.
   :type filename: str | Path, optional
   :param \*\*kwargs: Additional keyword arguments to pass to the corner plot function.
   :type \*\*kwargs: additional keyword arguments

   :returns: **fig** -- The corner plot figure, if :code:`filename` is not provided.
   :rtype: matplotlib.figure.Figure


