Skip to content
Make a sweet giant triangle confusogram (GTC) plot
Branch: master
Clone or download
SebastianBocquet Merge pull request #15 from exowanderer/patch-1
Changed `==` to `is` on line 397
Latest commit 6765e2f Nov 13, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs update to documentation notebooks Nov 13, 2017
paper new DOI for v0.2.1 Oct 2, 2016
pygtc Changed `==` to `is` Nov 13, 2018
tests
.gitignore exclude _build directory in commits Aug 7, 2017
CHANGELOG.rst stupid update because pypi will not let you update metadata Nov 14, 2017
LICENSE.txt update LICENSE Jul 22, 2016
MANIFEST.in Bumped version (no tag yet) and updated docs Jan 18, 2017
Planck-vs-WMAP.ipynb rerun Planck-WMAP demo Nov 13, 2017
README.rst hard link to readme image for pypi Nov 13, 2017
VERSION.txt stupid update because pypi will not let you update metadata Nov 14, 2017
convert_notebooks.sh Big update to documentation to bring it up to date. Also added a tool… Nov 8, 2017
demo.ipynb update demo Nov 13, 2017
environment.yml Specify a custom conda env for the readthedocs build Nov 9, 2017
readthedocs.yml Specify a custom conda env for the readthedocs build Nov 9, 2017
requirements.txt fix tests and update docs to reflect changes Nov 7, 2017
setup.cfg fix tests and update docs to reflect changes Nov 7, 2017
setup.py stupid name has to be pyGTC in that case or else.... Aug 7, 2017

README.rst

pygtc.py

What is a Giant Triangle Confusogram?

A Giant-Triangle-Confusogram (GTC, aka triangle plot) is a way of displaying the results of a Monte-Carlo Markov Chain (MCMC) sampling or similar analysis. (For a discussion of MCMC analysis, see the excellent emcee package.) The recovered parameter constraints are displayed on a grid in which the diagonal shows the one-dimensional posteriors (and, optionally, priors) and the lower-left triangle shows the pairwise projections. You might want to look at a plot like this if you are fitting a model to data and want to see the parameter covariances along with the priors.

Here's an example of a GTC with some random data and arbitrary labels:

pygtc.plotGTC(chains=[samples1,samples2],
              paramNames=names,
              chainLabels=chainLabels,
              truths=truths,
              truthLabels=truthLabels,
              priors=priors,
              paramRanges=paramRanges,
              figureSize='MNRAS_page')

https://raw.githubusercontent.com/SebastianBocquet/pygtc/master/docs/_static/demo_files/demo_9_1.png

But doesn't this already exist in corner.py, distUtils, etc...?

Although several other packages exists to make such a plot, we were unsatisfied with the amount of extra work required to massage the result into something we were happy to publish. With pygtc, we hope to take that extra legwork out of the equation by providing a package that gives a figure that is publication ready on the first try! You should try all the packages and use the one you like most; for us, that is pygtc!

Installation

For a quick start, you can just use pip. It will install the required dependencies for you (numpy and matplotlib):

pip install pygtc

For more installation details, see the documentation.

Documentation

Documentation is hosted at ReadTheDocs, or check out demo.ipynp, in this repository, for a working example.

To build your own local copy of the documentation you'll need to install sphinx. Then you can run make html from within the docs folder.

Citation

If you use pygtc to generate plots for a publication, please cite as:

@article{Bocquet2016,
  doi = {10.21105/joss.00046},
  url = {http://dx.doi.org/10.21105/joss.00046},
  year  = {2016},
  month = {oct},
  publisher = {The Open Journal},
  volume = {1},
  number = {6},
  author = {Sebastian Bocquet and Faustin W. Carter},
  title = {pygtc: beautiful parameter covariance plots (aka. Giant Triangle Confusograms)},
  journal = {The Journal of Open Source Software}
}

Copyright 2016, Sebastian Bocquet and Faustin W. Carter

You can’t perform that action at this time.