Getting Started With mcmcplot

Author(s): Paul Miles | August 7, 2018

Introduction

The mcmcplot package is designed to assist in the analysis of sampling chains gathered during a Markov Chain Monte Carlo (MCMC) simulation. This package was designed with the MCMC code pymcmcstat in mind; however, the plotting routines are amenable to other data sets. The plotting routines use matplotlib and seaborn. User's are recommended to investigate other plotting routines available in seaborn as it is specifically designed for this sort of analysis. The routines available in mcmcplot serve as a useful wrapper function for several seaborn plots, but it is not an exhaustive demonstration.

Installation

The code can be found on the Github project page. The package is available on the PyPI distribution site and the latest version can be installed via

pip install mcmcplot

The master branch typically matches the latest version on the PyPI distribution site. To install the master branch directly from Github,

pip install git+https://github.com/prmiles/mcmcplot.git

You can also clone the repository and run python setup.py install.

Basic Examples

The following examples demonstrate how to plot a set of randomly generated chains. For physically motivated examples, see the pymcmcstat tutorials.


Chain Panel

Key Features:

  • Basic chain panel plotting.
  • Adding lines for mean and $\pm$ 2 standard deviations.
  • Defining parameter names and editing plot appearance using settings.
  • Manually editing plot features.







Density Panel

Key Features:

  • Basic density panel plotting.
  • Adding histograms to plot.
  • Defining parameter names and editing plot appearance using settings.
  • Manually editing plot features.







Pairwise Correlation Panel

Key Features:

  • Basic pairwise correlation panel plotting.
  • Adding 50% and 95% probability contours.
  • Defining parameter names and editing plot appearance using settings.
  • Manually editing plot features.











Joint Distributions

Key Features:

  • Basic joint distribution plotting.
  • Changing the type of joint distribution.
  • Editing the seaborn style and settings.












Paired Density Matrix

Key Features:

  • Basic paired density matrix plotting.
  • Changing the main diagonal, lower triangle, and upper triangle plot types.
  • Editing the seaborn style and settings.