Skip to main content

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 install with either pip or conda. Either will install the required dependencies for you (packaging, numpy, and matplotlib):

$ pip install pygtc

or, if you use conda:

$ conda install pygtc -c conda-forge

For more installation details, see the documentation.

Documentation

Documentation is hosted at ReadTheDocs. Find an exhaustive set of examples there!

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

https://zenodo.org/badge/DOI/10.5281/zenodo.159091.svg

Metadata

Release files for pyGTC 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyGTC 0.5.0
File Size Uploaded Provenance Actions
pyGTC-0.5.0.tar.gz 3.2 MB Without provenance Details for pyGTC-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyGTC 0.5.0
File Interpreter ABI Platform Actions
pyGTC-0.5.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for pyGTC-0.5.0-py2.py3-none-any.whl

Total release size: 6.3 MB

Release files / pyGTC-0.5.0.tar.gz

Download URL pyGTC-0.5.0.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
179dd20e99142bb2f351c64d2a5b0a4c9d5e6245c746888cd406e1c0aaf79400
BLAKE2b-256 checksum
How to use checksums
c138e6608b22473066aa9a640affcd81cc5524f772d1b8edd34f9e1c013bd5a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / pyGTC-0.5.0-py2.py3-none-any.whl

Download URL pyGTC-0.5.0-py2.py3-none-any.whl
Size 3.2 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
40895a41f83cca81dc565b649bbc6ccb214fa664dc1dbdc8f0aad70844c3e79c
BLAKE2b-256 checksum
How to use checksums
10f64c2c19e12434be59fa1b9fae53fc9302d9430d876a868d9272821d8d4df0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Security for pyGTC 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page